Lines Matching refs:bss
77 static void bss_free(struct cfg80211_internal_bss *bss) in bss_free() argument
81 if (WARN_ON(atomic_read(&bss->hold))) in bss_free()
84 ies = (void *)rcu_access_pointer(bss->pub.beacon_ies); in bss_free()
85 if (ies && !bss->pub.hidden_beacon_bss) in bss_free()
87 ies = (void *)rcu_access_pointer(bss->pub.proberesp_ies); in bss_free()
95 if (!list_empty(&bss->hidden_list)) in bss_free()
96 list_del(&bss->hidden_list); in bss_free()
98 kfree(bss); in bss_free()
102 struct cfg80211_internal_bss *bss) in bss_ref_get() argument
106 bss->refcount++; in bss_ref_get()
108 if (bss->pub.hidden_beacon_bss) in bss_ref_get()
109 bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++; in bss_ref_get()
111 if (bss->pub.transmitted_bss) in bss_ref_get()
112 bss_from_pub(bss->pub.transmitted_bss)->refcount++; in bss_ref_get()
116 struct cfg80211_internal_bss *bss) in bss_ref_put() argument
120 if (bss->pub.hidden_beacon_bss) { in bss_ref_put()
122 hbss = container_of(bss->pub.hidden_beacon_bss, in bss_ref_put()
130 if (bss->pub.transmitted_bss) { in bss_ref_put()
133 tbss = container_of(bss->pub.transmitted_bss, in bss_ref_put()
141 bss->refcount--; in bss_ref_put()
142 if (bss->refcount == 0) in bss_ref_put()
143 bss_free(bss); in bss_ref_put()
147 struct cfg80211_internal_bss *bss) in __cfg80211_unlink_bss() argument
151 if (!list_empty(&bss->hidden_list)) { in __cfg80211_unlink_bss()
156 if (!bss->pub.hidden_beacon_bss) in __cfg80211_unlink_bss()
162 list_del_init(&bss->hidden_list); in __cfg80211_unlink_bss()
165 list_del_init(&bss->list); in __cfg80211_unlink_bss()
166 list_del_init(&bss->pub.nontrans_list); in __cfg80211_unlink_bss()
167 rb_erase(&bss->rbn, &rdev->bss_tree); in __cfg80211_unlink_bss()
172 bss_ref_put(rdev, bss); in __cfg80211_unlink_bss()
404 struct cfg80211_bss *bss = NULL; in cfg80211_add_nontrans_list() local
416 list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) { in cfg80211_add_nontrans_list()
417 if (is_bss(bss, nontrans_bss->bssid, ssid, ssid_len)) { in cfg80211_add_nontrans_list()
442 struct cfg80211_internal_bss *bss, *tmp; in __cfg80211_bss_expire() local
447 list_for_each_entry_safe(bss, tmp, &rdev->bss_list, list) { in __cfg80211_bss_expire()
448 if (atomic_read(&bss->hold)) in __cfg80211_bss_expire()
450 if (!time_after(expire_time, bss->ts)) in __cfg80211_bss_expire()
453 if (__cfg80211_unlink_bss(rdev, bss)) in __cfg80211_bss_expire()
463 struct cfg80211_internal_bss *bss, *oldest = NULL; in cfg80211_bss_expire_oldest() local
468 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_bss_expire_oldest()
469 if (atomic_read(&bss->hold)) in cfg80211_bss_expire_oldest()
472 if (!list_empty(&bss->hidden_list) && in cfg80211_bss_expire_oldest()
473 !bss->pub.hidden_beacon_bss) in cfg80211_bss_expire_oldest()
476 if (oldest && time_before(oldest->ts, bss->ts)) in cfg80211_bss_expire_oldest()
478 oldest = bss; in cfg80211_bss_expire_oldest()
746 struct cfg80211_internal_bss *bss; in cfg80211_bss_age() local
750 list_for_each_entry(bss, &rdev->bss_list, list) in cfg80211_bss_age()
751 bss->ts -= age_jiffies; in cfg80211_bss_age()
965 struct cfg80211_internal_bss *bss, *res = NULL; in cfg80211_get_bss() local
974 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_get_bss()
975 if (!cfg80211_bss_type_match(bss->pub.capability, in cfg80211_get_bss()
976 bss->pub.channel->band, bss_type)) in cfg80211_get_bss()
979 bss_privacy = (bss->pub.capability & WLAN_CAPABILITY_PRIVACY); in cfg80211_get_bss()
983 if (channel && bss->pub.channel != channel) in cfg80211_get_bss()
985 if (!is_valid_ether_addr(bss->pub.bssid)) in cfg80211_get_bss()
988 if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) && in cfg80211_get_bss()
989 !atomic_read(&bss->hold)) in cfg80211_get_bss()
991 if (is_bss(&bss->pub, bssid, ssid, ssid_len)) { in cfg80211_get_bss()
992 res = bss; in cfg80211_get_bss()
1007 struct cfg80211_internal_bss *bss) in rb_insert_bss() argument
1018 cmp = cmp_bss(&bss->pub, &tbss->pub, BSS_CMP_REGULAR); in rb_insert_bss()
1031 rb_link_node(&bss->rbn, parent, p); in rb_insert_bss()
1032 rb_insert_color(&bss->rbn, &rdev->bss_tree); in rb_insert_bss()
1041 struct cfg80211_internal_bss *bss; in rb_find_bss() local
1045 bss = rb_entry(n, struct cfg80211_internal_bss, rbn); in rb_find_bss()
1046 r = cmp_bss(&res->pub, &bss->pub, mode); in rb_find_bss()
1049 return bss; in rb_find_bss()
1063 struct cfg80211_internal_bss *bss; in cfg80211_combine_bsses() local
1090 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_combine_bsses()
1097 if (!ether_addr_equal(bss->pub.bssid, new->pub.bssid)) in cfg80211_combine_bsses()
1099 if (bss->pub.channel != new->pub.channel) in cfg80211_combine_bsses()
1101 if (bss->pub.scan_width != new->pub.scan_width) in cfg80211_combine_bsses()
1103 if (rcu_access_pointer(bss->pub.beacon_ies)) in cfg80211_combine_bsses()
1105 ies = rcu_access_pointer(bss->pub.ies); in cfg80211_combine_bsses()
1113 if (WARN_ON_ONCE(bss->pub.hidden_beacon_bss)) in cfg80211_combine_bsses()
1115 if (WARN_ON_ONCE(!list_empty(&bss->hidden_list))) in cfg80211_combine_bsses()
1116 list_del(&bss->hidden_list); in cfg80211_combine_bsses()
1118 list_add(&bss->hidden_list, &new->hidden_list); in cfg80211_combine_bsses()
1119 bss->pub.hidden_beacon_bss = &new->pub; in cfg80211_combine_bsses()
1120 new->refcount += bss->refcount; in cfg80211_combine_bsses()
1121 rcu_assign_pointer(bss->pub.beacon_ies, in cfg80211_combine_bsses()
1142 struct cfg80211_internal_bss *bss; in cfg80211_update_hidden_bsses() local
1145 list_for_each_entry(bss, &known->hidden_list, hidden_list) { in cfg80211_update_hidden_bsses()
1148 ies = rcu_access_pointer(bss->pub.beacon_ies); in cfg80211_update_hidden_bsses()
1151 rcu_assign_pointer(bss->pub.beacon_ies, new_ies); in cfg80211_update_hidden_bsses()
1623 struct cfg80211_bss *bss; in cfg80211_parse_mbssid_data() local
1706 bss = cfg80211_inform_single_bss_data(wiphy, data, in cfg80211_parse_mbssid_data()
1715 if (!bss) in cfg80211_parse_mbssid_data()
1717 cfg80211_put_bss(wiphy, bss); in cfg80211_parse_mbssid_data()
2001 struct cfg80211_internal_bss *bss; in cfg80211_ref_bss() local
2006 bss = container_of(pub, struct cfg80211_internal_bss, pub); in cfg80211_ref_bss()
2009 bss_ref_get(rdev, bss); in cfg80211_ref_bss()
2017 struct cfg80211_internal_bss *bss; in cfg80211_put_bss() local
2022 bss = container_of(pub, struct cfg80211_internal_bss, pub); in cfg80211_put_bss()
2025 bss_ref_put(rdev, bss); in cfg80211_put_bss()
2033 struct cfg80211_internal_bss *bss, *tmp1; in cfg80211_unlink_bss() local
2039 bss = container_of(pub, struct cfg80211_internal_bss, pub); in cfg80211_unlink_bss()
2042 if (list_empty(&bss->list)) in cfg80211_unlink_bss()
2054 if (__cfg80211_unlink_bss(rdev, bss)) in cfg80211_unlink_bss()
2064 struct cfg80211_bss *bss, in cfg80211_bss_iter() argument
2069 struct cfg80211_internal_bss *bss; in cfg80211_bss_iter() local
2073 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_bss_iter()
2074 if (!chandef || cfg80211_is_sub_chan(chandef, bss->pub.channel)) in cfg80211_bss_iter()
2075 iter(wiphy, &bss->pub, iter_data); in cfg80211_bss_iter()
2089 struct cfg80211_internal_bss *bss; in cfg80211_update_assoc_bss_entry() local
2110 list_for_each_entry(bss, &rdev->bss_list, list) { in cfg80211_update_assoc_bss_entry()
2111 if (!cfg80211_bss_type_match(bss->pub.capability, in cfg80211_update_assoc_bss_entry()
2112 bss->pub.channel->band, in cfg80211_update_assoc_bss_entry()
2116 if (bss == cbss) in cfg80211_update_assoc_bss_entry()
2119 if (!cmp_bss(&bss->pub, &cbss->pub, BSS_CMP_REGULAR)) { in cfg80211_update_assoc_bss_entry()
2120 new = bss; in cfg80211_update_assoc_bss_entry()
2135 bss = container_of(nontrans_bss, in cfg80211_update_assoc_bss_entry()
2137 if (__cfg80211_unlink_bss(rdev, bss)) in cfg80211_update_assoc_bss_entry()
2153 bss = container_of(nontrans_bss, in cfg80211_update_assoc_bss_entry()
2155 bss->pub.channel = chan; in cfg80211_update_assoc_bss_entry()
2156 rb_erase(&bss->rbn, &rdev->bss_tree); in cfg80211_update_assoc_bss_entry()
2157 rb_insert_bss(rdev, bss); in cfg80211_update_assoc_bss_entry()
2370 struct cfg80211_internal_bss *bss, char *current_ev, in ieee80211_bss() argument
2384 memcpy(iwe.u.ap_addr.sa_data, bss->pub.bssid, ETH_ALEN); in ieee80211_bss()
2392 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->pub.channel->center_freq); in ieee80211_bss()
2401 iwe.u.freq.m = bss->pub.channel->center_freq; in ieee80211_bss()
2416 sig = bss->pub.signal / 100; in ieee80211_bss()
2427 iwe.u.qual.level = bss->pub.signal; in ieee80211_bss()
2429 iwe.u.qual.qual = bss->pub.signal; in ieee80211_bss()
2444 if (bss->pub.capability & WLAN_CAPABILITY_PRIVACY) in ieee80211_bss()
2455 ies = rcu_dereference(bss->pub.ies); in ieee80211_bss()
2585 if (bss->pub.capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS) || in ieee80211_bss()
2591 else if (bss->pub.capability & WLAN_CAPABILITY_ESS) in ieee80211_bss()
2613 elapsed_jiffies_msecs(bss->ts)); in ieee80211_bss()
2634 struct cfg80211_internal_bss *bss; in ieee80211_scan_results() local
2640 list_for_each_entry(bss, &rdev->bss_list, list) { in ieee80211_scan_results()
2645 current_ev = ieee80211_bss(&rdev->wiphy, info, bss, in ieee80211_scan_results()