Lines Matching refs:tt_global_entry
71 batadv_tt_global_del_orig_list(struct batadv_tt_global_entry *tt_global_entry);
193 * Return: a pointer to the corresponding tt_global_entry struct if the client
201 struct batadv_tt_global_entry *tt_global_entry = NULL;
206 tt_global_entry = container_of(tt_common_entry,
209 return tt_global_entry;
259 * batadv_tt_global_entry_free_rcu() - free the tt_global_entry
260 * @rcu: rcu pointer of the tt_global_entry
264 struct batadv_tt_global_entry *tt_global_entry;
266 tt_global_entry = container_of(rcu, struct batadv_tt_global_entry,
269 kmem_cache_free(batadv_tg_cache, tt_global_entry);
273 * batadv_tt_global_entry_release() - release tt_global_entry from lists and
279 struct batadv_tt_global_entry *tt_global_entry;
281 tt_global_entry = container_of(ref, struct batadv_tt_global_entry,
284 batadv_tt_global_del_orig_list(tt_global_entry);
286 call_rcu(&tt_global_entry->common.rcu, batadv_tt_global_entry_free_rcu);
301 struct batadv_tt_global_entry *tt_global_entry;
304 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
305 if (!tt_global_entry)
308 count = atomic_read(&tt_global_entry->orig_list_count);
309 batadv_tt_global_entry_put(tt_global_entry);
1557 * find out if an orig_node is already in the list of a tt_global_entry.
1682 struct batadv_tt_global_entry *tt_global_entry;
1693 tt_global_entry = batadv_tt_global_hash_find(bat_priv, tt_addr, vid);
1704 if (!tt_global_entry) {
1705 tt_global_entry = kmem_cache_zalloc(batadv_tg_cache,
1707 if (!tt_global_entry)
1710 common = &tt_global_entry->common;
1717 tt_global_entry->roam_at = 0;
1723 tt_global_entry->roam_at = jiffies;
1727 INIT_HLIST_HEAD(&tt_global_entry->orig_list);
1728 atomic_set(&tt_global_entry->orig_list_count, 0);
1729 spin_lock_init(&tt_global_entry->list_lock);
1739 batadv_tt_global_entry_put(tt_global_entry);
1743 common = &tt_global_entry->common;
1757 if (batadv_tt_global_entry_has_orig(tt_global_entry,
1760 batadv_tt_global_del_orig_list(tt_global_entry);
1771 batadv_tt_global_del_orig_list(tt_global_entry);
1790 batadv_tt_global_del_orig_list(tt_global_entry);
1792 tt_global_entry->roam_at = 0;
1797 batadv_tt_global_orig_entry_add(tt_global_entry, orig_node, ttvn,
1817 tt_global_entry->common.flags |= local_flags & BATADV_TT_CLIENT_WIFI;
1823 tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_ROAM;
1826 if (tt_global_entry)
1827 batadv_tt_global_entry_put(tt_global_entry);
1836 * @tt_global_entry: global translation table entry to be analyzed
1843 struct batadv_tt_global_entry *tt_global_entry)
1850 head = &tt_global_entry->orig_list;
1883 * @tt_global_entry: global translation table entry to be printed
1890 struct batadv_tt_global_entry *tt_global_entry,
1900 tt_common_entry = &tt_global_entry->common;
1903 best_entry = batadv_transtable_best_orig(bat_priv, tt_global_entry);
1918 '*', tt_global_entry->common.addr,
1919 batadv_print_vid(tt_global_entry->common.vid),
1931 head = &tt_global_entry->orig_list;
1950 '+', tt_global_entry->common.addr,
1951 batadv_print_vid(tt_global_entry->common.vid),
2226 * @tt_global_entry: the global entry to remove the orig_entry from
2229 * Remove an orig_entry from its list in the given tt_global_entry and
2232 * Caller must hold tt_global_entry->list_lock and ensure orig_entry->list is
2236 _batadv_tt_global_del_orig_entry(struct batadv_tt_global_entry *tt_global_entry,
2239 lockdep_assert_held(&tt_global_entry->list_lock);
2242 tt_global_entry->common.vid);
2243 atomic_dec(&tt_global_entry->orig_list_count);
2244 /* requires holding tt_global_entry->list_lock and orig_entry->list
2251 /* deletes the orig list of a tt_global_entry */
2253 batadv_tt_global_del_orig_list(struct batadv_tt_global_entry *tt_global_entry)
2259 spin_lock_bh(&tt_global_entry->list_lock);
2260 head = &tt_global_entry->orig_list;
2262 _batadv_tt_global_del_orig_entry(tt_global_entry, orig_entry);
2263 spin_unlock_bh(&tt_global_entry->list_lock);
2269 * @tt_global_entry: the global entry to remove the orig_node from
2278 struct batadv_tt_global_entry *tt_global_entry,
2287 spin_lock_bh(&tt_global_entry->list_lock);
2288 head = &tt_global_entry->orig_list;
2291 vid = tt_global_entry->common.vid;
2295 tt_global_entry->common.addr,
2297 _batadv_tt_global_del_orig_entry(tt_global_entry,
2301 spin_unlock_bh(&tt_global_entry->list_lock);
2310 struct batadv_tt_global_entry *tt_global_entry,
2323 head = &tt_global_entry->orig_list;
2334 tt_global_entry->common.flags |= BATADV_TT_CLIENT_ROAM;
2335 tt_global_entry->roam_at = jiffies;
2340 batadv_tt_global_del_orig_node(bat_priv, tt_global_entry,
2360 struct batadv_tt_global_entry *tt_global_entry;
2363 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
2364 if (!tt_global_entry)
2368 batadv_tt_global_del_orig_node(bat_priv, tt_global_entry,
2371 if (hlist_empty(&tt_global_entry->orig_list))
2372 batadv_tt_global_free(bat_priv, tt_global_entry,
2392 tt_global_entry->common.addr,
2396 batadv_tt_global_del_orig_list(tt_global_entry);
2397 batadv_tt_global_free(bat_priv, tt_global_entry, message);
2400 batadv_tt_global_del_roaming(bat_priv, tt_global_entry,
2405 if (tt_global_entry)
2406 batadv_tt_global_entry_put(tt_global_entry);
2569 struct batadv_tt_global_entry *tt_global_entry)
2572 tt_global_entry->common.flags & BATADV_TT_CLIENT_WIFI)
2577 tt_global_entry->common.flags & BATADV_TT_CLIENT_ISOLA)
2603 struct batadv_tt_global_entry *tt_global_entry = NULL;
2614 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
2615 if (!tt_global_entry)
2622 _batadv_is_ap_isolated(tt_local_entry, tt_global_entry))
2626 best_entry = batadv_transtable_best_orig(bat_priv, tt_global_entry);
2635 if (tt_global_entry)
2636 batadv_tt_global_entry_put(tt_global_entry);
2953 const struct batadv_tt_global_entry *tt_global_entry;
2960 tt_global_entry = container_of(tt_common_entry,
2964 return batadv_tt_global_entry_has_orig(tt_global_entry, orig_node,
3975 struct batadv_tt_global_entry *tt_global_entry;
3990 tt_global_entry = batadv_tt_global_hash_find(bat_priv, src, vid);
3991 if (!tt_global_entry)
3994 if (_batadv_is_ap_isolated(tt_local_entry, tt_global_entry))
3997 batadv_tt_global_entry_put(tt_global_entry);
4103 struct batadv_tt_global_entry *tt_global_entry;
4106 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
4107 if (!tt_global_entry)
4110 ret = tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM;
4111 batadv_tt_global_entry_put(tt_global_entry);