Lines Matching refs:tt_global_entry

70 batadv_tt_global_del_orig_list(struct batadv_tt_global_entry *tt_global_entry);
192 * Return: a pointer to the corresponding tt_global_entry struct if the client
200 struct batadv_tt_global_entry *tt_global_entry = NULL;
205 tt_global_entry = container_of(tt_common_entry,
208 return tt_global_entry;
258 * batadv_tt_global_entry_free_rcu() - free the tt_global_entry
259 * @rcu: rcu pointer of the tt_global_entry
263 struct batadv_tt_global_entry *tt_global_entry;
265 tt_global_entry = container_of(rcu, struct batadv_tt_global_entry,
268 kmem_cache_free(batadv_tg_cache, tt_global_entry);
272 * batadv_tt_global_entry_release() - release tt_global_entry from lists and
278 struct batadv_tt_global_entry *tt_global_entry;
280 tt_global_entry = container_of(ref, struct batadv_tt_global_entry,
283 batadv_tt_global_del_orig_list(tt_global_entry);
285 call_rcu(&tt_global_entry->common.rcu, batadv_tt_global_entry_free_rcu);
300 struct batadv_tt_global_entry *tt_global_entry;
303 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
304 if (!tt_global_entry)
307 count = atomic_read(&tt_global_entry->orig_list_count);
308 batadv_tt_global_entry_put(tt_global_entry);
1471 * find out if an orig_node is already in the list of a tt_global_entry.
1595 struct batadv_tt_global_entry *tt_global_entry;
1606 tt_global_entry = batadv_tt_global_hash_find(bat_priv, tt_addr, vid);
1617 if (!tt_global_entry) {
1618 tt_global_entry = kmem_cache_zalloc(batadv_tg_cache,
1620 if (!tt_global_entry)
1623 common = &tt_global_entry->common;
1630 tt_global_entry->roam_at = 0;
1636 tt_global_entry->roam_at = jiffies;
1640 INIT_HLIST_HEAD(&tt_global_entry->orig_list);
1641 atomic_set(&tt_global_entry->orig_list_count, 0);
1642 spin_lock_init(&tt_global_entry->list_lock);
1652 batadv_tt_global_entry_put(tt_global_entry);
1656 common = &tt_global_entry->common;
1670 if (batadv_tt_global_entry_has_orig(tt_global_entry,
1673 batadv_tt_global_del_orig_list(tt_global_entry);
1684 batadv_tt_global_del_orig_list(tt_global_entry);
1703 batadv_tt_global_del_orig_list(tt_global_entry);
1705 tt_global_entry->roam_at = 0;
1710 batadv_tt_global_orig_entry_add(tt_global_entry, orig_node, ttvn,
1730 tt_global_entry->common.flags |= local_flags & BATADV_TT_CLIENT_WIFI;
1736 tt_global_entry->common.flags &= ~BATADV_TT_CLIENT_ROAM;
1739 batadv_tt_global_entry_put(tt_global_entry);
1747 * @tt_global_entry: global translation table entry to be analyzed
1754 struct batadv_tt_global_entry *tt_global_entry)
1761 head = &tt_global_entry->orig_list;
2000 * @tt_global_entry: the global entry to remove the orig_entry from
2003 * Remove an orig_entry from its list in the given tt_global_entry and
2006 * Caller must hold tt_global_entry->list_lock and ensure orig_entry->list is
2010 _batadv_tt_global_del_orig_entry(struct batadv_tt_global_entry *tt_global_entry,
2013 lockdep_assert_held(&tt_global_entry->list_lock);
2016 tt_global_entry->common.vid);
2017 atomic_dec(&tt_global_entry->orig_list_count);
2018 /* requires holding tt_global_entry->list_lock and orig_entry->list
2025 /* deletes the orig list of a tt_global_entry */
2027 batadv_tt_global_del_orig_list(struct batadv_tt_global_entry *tt_global_entry)
2033 spin_lock_bh(&tt_global_entry->list_lock);
2034 head = &tt_global_entry->orig_list;
2036 _batadv_tt_global_del_orig_entry(tt_global_entry, orig_entry);
2037 spin_unlock_bh(&tt_global_entry->list_lock);
2043 * @tt_global_entry: the global entry to remove the orig_node from
2052 struct batadv_tt_global_entry *tt_global_entry,
2061 spin_lock_bh(&tt_global_entry->list_lock);
2062 head = &tt_global_entry->orig_list;
2065 vid = tt_global_entry->common.vid;
2069 tt_global_entry->common.addr,
2071 _batadv_tt_global_del_orig_entry(tt_global_entry,
2075 spin_unlock_bh(&tt_global_entry->list_lock);
2084 struct batadv_tt_global_entry *tt_global_entry,
2097 head = &tt_global_entry->orig_list;
2108 tt_global_entry->common.flags |= BATADV_TT_CLIENT_ROAM;
2109 tt_global_entry->roam_at = jiffies;
2114 batadv_tt_global_del_orig_node(bat_priv, tt_global_entry,
2134 struct batadv_tt_global_entry *tt_global_entry;
2137 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
2138 if (!tt_global_entry)
2142 batadv_tt_global_del_orig_node(bat_priv, tt_global_entry,
2145 if (hlist_empty(&tt_global_entry->orig_list))
2146 batadv_tt_global_free(bat_priv, tt_global_entry,
2166 tt_global_entry->common.addr,
2170 batadv_tt_global_del_orig_list(tt_global_entry);
2171 batadv_tt_global_free(bat_priv, tt_global_entry, message);
2174 batadv_tt_global_del_roaming(bat_priv, tt_global_entry,
2179 batadv_tt_global_entry_put(tt_global_entry);
2341 struct batadv_tt_global_entry *tt_global_entry)
2344 tt_global_entry->common.flags & BATADV_TT_CLIENT_WIFI)
2349 tt_global_entry->common.flags & BATADV_TT_CLIENT_ISOLA)
2375 struct batadv_tt_global_entry *tt_global_entry = NULL;
2386 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
2387 if (!tt_global_entry)
2394 _batadv_is_ap_isolated(tt_local_entry, tt_global_entry))
2398 best_entry = batadv_transtable_best_orig(bat_priv, tt_global_entry);
2407 batadv_tt_global_entry_put(tt_global_entry);
2723 const struct batadv_tt_global_entry *tt_global_entry;
2730 tt_global_entry = container_of(tt_common_entry,
2734 return batadv_tt_global_entry_has_orig(tt_global_entry, orig_node,
3735 struct batadv_tt_global_entry *tt_global_entry;
3750 tt_global_entry = batadv_tt_global_hash_find(bat_priv, src, vid);
3751 if (!tt_global_entry)
3754 if (_batadv_is_ap_isolated(tt_local_entry, tt_global_entry))
3757 batadv_tt_global_entry_put(tt_global_entry);
3863 struct batadv_tt_global_entry *tt_global_entry;
3866 tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
3867 if (!tt_global_entry)
3870 ret = tt_global_entry->common.flags & BATADV_TT_CLIENT_ROAM;
3871 batadv_tt_global_entry_put(tt_global_entry);