Lines Matching refs:bss
118 static void bss_free(struct cfg80211_internal_bss *bss) in bss_free() argument
122 if (WARN_ON(atomic_read(&bss->hold))) in bss_free()
125 ies = (void *)rcu_access_pointer(bss->pub.beacon_ies); in bss_free()
126 if (ies && !bss->pub.hidden_beacon_bss) in bss_free()
128 ies = (void *)rcu_access_pointer(bss->pub.proberesp_ies); in bss_free()
136 if (!list_empty(&bss->hidden_list)) in bss_free()
137 list_del(&bss->hidden_list); in bss_free()
139 kfree(bss); in bss_free()
143 struct cfg80211_internal_bss *bss) in bss_ref_get() argument
147 bss->refcount++; in bss_ref_get()
149 if (bss->pub.hidden_beacon_bss) in bss_ref_get()
150 bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++; in bss_ref_get()
152 if (bss->pub.transmitted_bss) in bss_ref_get()
153 bss_from_pub(bss->pub.transmitted_bss)->refcount++; in bss_ref_get()
157 struct cfg80211_internal_bss *bss) in bss_ref_put() argument
161 if (bss->pub.hidden_beacon_bss) { in bss_ref_put()
164 hbss = bss_from_pub(bss->pub.hidden_beacon_bss); in bss_ref_put()
170 if (bss->pub.transmitted_bss) { in bss_ref_put()
173 tbss = bss_from_pub(bss->pub.transmitted_bss); in bss_ref_put()
179 bss->refcount--; in bss_ref_put()
180 if (bss->refcount == 0) in bss_ref_put()
181 bss_free(bss); in bss_ref_put()
185 struct cfg80211_internal_bss *bss) in __cfg80211_unlink_bss() argument
189 if (!list_empty(&bss->hidden_list)) { in __cfg80211_unlink_bss()
194 if (!bss->pub.hidden_beacon_bss) in __cfg80211_unlink_bss()
200 list_del_init(&bss->hidden_list); in __cfg80211_unlink_bss()
203 list_del_init(&bss->list); in __cfg80211_unlink_bss()
204 list_del_init(&bss->pub.nontrans_list); in __cfg80211_unlink_bss()
205 rb_erase(&bss->rbn, &rdev->bss_tree); in __cfg80211_unlink_bss()
210 bss_ref_put(rdev, bss); in __cfg80211_unlink_bss()
445 struct cfg80211_bss *bss = NULL; in cfg80211_add_nontrans_list() local
455 list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) { in cfg80211_add_nontrans_list()
456 if (is_bss(bss, nontrans_bss->bssid, ssid_elem->data, in cfg80211_add_nontrans_list()
482 struct cfg80211_internal_bss *bss, *tmp; in __cfg80211_bss_expire() local
487 list_for_each_entry_safe(bss, tmp, &rdev->bss_list, list) { in __cfg80211_bss_expire()
488 if (atomic_read(&bss->hold)) in __cfg80211_bss_expire()
490 if (!time_after(expire_time, bss->ts)) in __cfg80211_bss_expire()
493 if (__cfg80211_unlink_bss(rdev, bss)) in __cfg80211_bss_expire()
503 struct cfg80211_internal_bss *bss, *oldest = NULL; in cfg80211_bss_expire_oldest() local
508 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_bss_expire_oldest()
509 if (atomic_read(&bss->hold)) in cfg80211_bss_expire_oldest()
512 if (!list_empty(&bss->hidden_list) && in cfg80211_bss_expire_oldest()
513 !bss->pub.hidden_beacon_bss) in cfg80211_bss_expire_oldest()
516 if (oldest && time_before(oldest->ts, bss->ts)) in cfg80211_bss_expire_oldest()
518 oldest = bss; in cfg80211_bss_expire_oldest()
1371 struct cfg80211_internal_bss *bss; in cfg80211_bss_age() local
1375 list_for_each_entry(bss, &rdev->bss_list, list) in cfg80211_bss_age()
1376 bss->ts -= age_jiffies; in cfg80211_bss_age()
1602 struct cfg80211_internal_bss *bss, *res = NULL; in __cfg80211_get_bss() local
1611 list_for_each_entry(bss, &rdev->bss_list, list) { in __cfg80211_get_bss()
1612 if (!cfg80211_bss_type_match(bss->pub.capability, in __cfg80211_get_bss()
1613 bss->pub.channel->band, bss_type)) in __cfg80211_get_bss()
1616 bss_privacy = (bss->pub.capability & WLAN_CAPABILITY_PRIVACY); in __cfg80211_get_bss()
1620 if (channel && bss->pub.channel != channel) in __cfg80211_get_bss()
1622 if (!is_valid_ether_addr(bss->pub.bssid)) in __cfg80211_get_bss()
1624 if ((bss->pub.use_for & use_for) != use_for) in __cfg80211_get_bss()
1627 if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) && in __cfg80211_get_bss()
1628 !atomic_read(&bss->hold)) in __cfg80211_get_bss()
1630 if (is_bss(&bss->pub, bssid, ssid, ssid_len)) { in __cfg80211_get_bss()
1631 res = bss; in __cfg80211_get_bss()
1646 struct cfg80211_internal_bss *bss) in rb_insert_bss() argument
1657 cmp = cmp_bss(&bss->pub, &tbss->pub, BSS_CMP_REGULAR); in rb_insert_bss()
1670 rb_link_node(&bss->rbn, parent, p); in rb_insert_bss()
1671 rb_insert_color(&bss->rbn, &rdev->bss_tree); in rb_insert_bss()
1680 struct cfg80211_internal_bss *bss; in rb_find_bss() local
1684 bss = rb_entry(n, struct cfg80211_internal_bss, rbn); in rb_find_bss()
1685 r = cmp_bss(&res->pub, &bss->pub, mode); in rb_find_bss()
1688 return bss; in rb_find_bss()
1702 struct cfg80211_internal_bss *bss; in cfg80211_combine_bsses() local
1729 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_combine_bsses()
1736 if (!ether_addr_equal(bss->pub.bssid, new->pub.bssid)) in cfg80211_combine_bsses()
1738 if (bss->pub.channel != new->pub.channel) in cfg80211_combine_bsses()
1740 if (rcu_access_pointer(bss->pub.beacon_ies)) in cfg80211_combine_bsses()
1742 ies = rcu_access_pointer(bss->pub.ies); in cfg80211_combine_bsses()
1750 if (WARN_ON_ONCE(bss->pub.hidden_beacon_bss)) in cfg80211_combine_bsses()
1752 if (WARN_ON_ONCE(!list_empty(&bss->hidden_list))) in cfg80211_combine_bsses()
1753 list_del(&bss->hidden_list); in cfg80211_combine_bsses()
1755 list_add(&bss->hidden_list, &new->hidden_list); in cfg80211_combine_bsses()
1756 bss->pub.hidden_beacon_bss = &new->pub; in cfg80211_combine_bsses()
1757 new->refcount += bss->refcount; in cfg80211_combine_bsses()
1758 rcu_assign_pointer(bss->pub.beacon_ies, in cfg80211_combine_bsses()
1773 struct cfg80211_internal_bss *bss; in cfg80211_update_hidden_bsses() local
1776 list_for_each_entry(bss, &known->hidden_list, hidden_list) { in cfg80211_update_hidden_bsses()
1779 ies = rcu_access_pointer(bss->pub.beacon_ies); in cfg80211_update_hidden_bsses()
1782 rcu_assign_pointer(bss->pub.beacon_ies, new_ies); in cfg80211_update_hidden_bsses()
2388 struct cfg80211_bss *bss; in cfg80211_parse_mbssid_data() local
2480 bss = cfg80211_inform_single_bss_data(wiphy, &data, gfp); in cfg80211_parse_mbssid_data()
2481 if (!bss) in cfg80211_parse_mbssid_data()
2483 cfg80211_put_bss(wiphy, bss); in cfg80211_parse_mbssid_data()
2847 struct cfg80211_bss *bss; in cfg80211_parse_ml_elem_sta_data() local
3037 bss = cfg80211_inform_single_bss_data(wiphy, &data, gfp); in cfg80211_parse_ml_elem_sta_data()
3038 if (!bss) in cfg80211_parse_ml_elem_sta_data()
3040 cfg80211_put_bss(wiphy, bss); in cfg80211_parse_ml_elem_sta_data()
3219 struct cfg80211_internal_bss *bss, *tmp1; in cfg80211_unlink_bss() local
3225 bss = bss_from_pub(pub); in cfg80211_unlink_bss()
3228 if (list_empty(&bss->list)) in cfg80211_unlink_bss()
3239 if (__cfg80211_unlink_bss(rdev, bss)) in cfg80211_unlink_bss()
3249 struct cfg80211_bss *bss, in cfg80211_bss_iter() argument
3254 struct cfg80211_internal_bss *bss; in cfg80211_bss_iter() local
3258 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_bss_iter()
3259 if (!chandef || cfg80211_is_sub_chan(chandef, bss->pub.channel, in cfg80211_bss_iter()
3261 iter(wiphy, &bss->pub, iter_data); in cfg80211_bss_iter()
3276 struct cfg80211_internal_bss *bss; in cfg80211_update_assoc_bss_entry() local
3295 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_update_assoc_bss_entry()
3296 if (!cfg80211_bss_type_match(bss->pub.capability, in cfg80211_update_assoc_bss_entry()
3297 bss->pub.channel->band, in cfg80211_update_assoc_bss_entry()
3301 if (bss == cbss) in cfg80211_update_assoc_bss_entry()
3304 if (!cmp_bss(&bss->pub, &cbss->pub, BSS_CMP_REGULAR)) { in cfg80211_update_assoc_bss_entry()
3305 new = bss; in cfg80211_update_assoc_bss_entry()
3319 bss = bss_from_pub(nontrans_bss); in cfg80211_update_assoc_bss_entry()
3320 if (__cfg80211_unlink_bss(rdev, bss)) in cfg80211_update_assoc_bss_entry()
3336 bss = bss_from_pub(nontrans_bss); in cfg80211_update_assoc_bss_entry()
3337 bss->pub.channel = chan; in cfg80211_update_assoc_bss_entry()
3338 rb_erase(&bss->rbn, &rdev->bss_tree); in cfg80211_update_assoc_bss_entry()
3339 rb_insert_bss(rdev, bss); in cfg80211_update_assoc_bss_entry()
3557 struct cfg80211_internal_bss *bss, char *current_ev, in ieee80211_bss() argument
3571 memcpy(iwe.u.ap_addr.sa_data, bss->pub.bssid, ETH_ALEN); in ieee80211_bss()
3579 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->pub.channel->center_freq); in ieee80211_bss()
3588 iwe.u.freq.m = bss->pub.channel->center_freq; in ieee80211_bss()
3603 sig = bss->pub.signal / 100; in ieee80211_bss()
3614 iwe.u.qual.level = bss->pub.signal; in ieee80211_bss()
3616 iwe.u.qual.qual = bss->pub.signal; in ieee80211_bss()
3631 if (bss->pub.capability & WLAN_CAPABILITY_PRIVACY) in ieee80211_bss()
3642 ies = rcu_dereference(bss->pub.ies); in ieee80211_bss()
3772 if (bss->pub.capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS) || in ieee80211_bss()
3778 else if (bss->pub.capability & WLAN_CAPABILITY_ESS) in ieee80211_bss()
3800 elapsed_jiffies_msecs(bss->ts)); in ieee80211_bss()
3821 struct cfg80211_internal_bss *bss; in ieee80211_scan_results() local
3827 list_for_each_entry(bss, &rdev->bss_list, list) { in ieee80211_scan_results()
3832 current_ev = ieee80211_bss(&rdev->wiphy, info, bss, in ieee80211_scan_results()