Lines Matching refs:bss
98 struct cfg80211_internal_bss *bss; in bss_release() local
100 bss = container_of(ref, struct cfg80211_internal_bss, ref); in bss_release()
101 if (bss->pub.free_priv) in bss_release()
102 bss->pub.free_priv(&bss->pub); in bss_release()
104 if (bss->beacon_ies_allocated) in bss_release()
105 kfree(bss->pub.beacon_ies); in bss_release()
106 if (bss->proberesp_ies_allocated) in bss_release()
107 kfree(bss->pub.proberesp_ies); in bss_release()
109 BUG_ON(atomic_read(&bss->hold)); in bss_release()
111 kfree(bss); in bss_release()
118 struct cfg80211_internal_bss *bss; in cfg80211_bss_age() local
121 list_for_each_entry(bss, &dev->bss_list, list) { in cfg80211_bss_age()
122 bss->ts -= age_jiffies; in cfg80211_bss_age()
128 struct cfg80211_internal_bss *bss) in __cfg80211_unlink_bss() argument
130 list_del_init(&bss->list); in __cfg80211_unlink_bss()
131 rb_erase(&bss->rbn, &dev->bss_tree); in __cfg80211_unlink_bss()
132 kref_put(&bss->ref, bss_release); in __cfg80211_unlink_bss()
138 struct cfg80211_internal_bss *bss, *tmp; in cfg80211_bss_expire() local
141 list_for_each_entry_safe(bss, tmp, &dev->bss_list, list) { in cfg80211_bss_expire()
142 if (atomic_read(&bss->hold)) in cfg80211_bss_expire()
144 if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) in cfg80211_bss_expire()
146 __cfg80211_unlink_bss(dev, bss); in cfg80211_bss_expire()
284 struct cfg80211_internal_bss *bss, *res = NULL; in cfg80211_get_bss() local
289 list_for_each_entry(bss, &dev->bss_list, list) { in cfg80211_get_bss()
290 if ((bss->pub.capability & capa_mask) != capa_val) in cfg80211_get_bss()
292 if (channel && bss->pub.channel != channel) in cfg80211_get_bss()
295 if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) && in cfg80211_get_bss()
296 !atomic_read(&bss->hold)) in cfg80211_get_bss()
298 if (is_bss(&bss->pub, bssid, ssid, ssid_len)) { in cfg80211_get_bss()
299 res = bss; in cfg80211_get_bss()
318 struct cfg80211_internal_bss *bss, *res = NULL; in cfg80211_get_mesh() local
322 list_for_each_entry(bss, &dev->bss_list, list) { in cfg80211_get_mesh()
323 if (channel && bss->pub.channel != channel) in cfg80211_get_mesh()
325 if (is_mesh(&bss->pub, meshid, meshidlen, meshcfg)) { in cfg80211_get_mesh()
326 res = bss; in cfg80211_get_mesh()
341 struct cfg80211_internal_bss *bss) in rb_insert_bss() argument
352 cmp = cmp_bss(&bss->pub, &tbss->pub); in rb_insert_bss()
365 rb_link_node(&bss->rbn, parent, p); in rb_insert_bss()
366 rb_insert_color(&bss->rbn, &dev->bss_tree); in rb_insert_bss()
374 struct cfg80211_internal_bss *bss; in rb_find_bss() local
378 bss = rb_entry(n, struct cfg80211_internal_bss, rbn); in rb_find_bss()
379 r = cmp_bss(&res->pub, &bss->pub); in rb_find_bss()
382 return bss; in rb_find_bss()
657 struct cfg80211_internal_bss *bss; in cfg80211_put_bss() local
662 bss = container_of(pub, struct cfg80211_internal_bss, pub); in cfg80211_put_bss()
663 kref_put(&bss->ref, bss_release); in cfg80211_put_bss()
670 struct cfg80211_internal_bss *bss; in cfg80211_unlink_bss() local
675 bss = container_of(pub, struct cfg80211_internal_bss, pub); in cfg80211_unlink_bss()
678 if (!list_empty(&bss->list)) { in cfg80211_unlink_bss()
679 __cfg80211_unlink_bss(dev, bss); in cfg80211_unlink_bss()
817 struct cfg80211_bss *bss, in ieee80211_scan_add_ies() argument
823 if (!bss->information_elements || in ieee80211_scan_add_ies()
824 !bss->len_information_elements) in ieee80211_scan_add_ies()
831 pos = bss->information_elements; in ieee80211_scan_add_ies()
832 end = pos + bss->len_information_elements; in ieee80211_scan_add_ies()
869 struct cfg80211_internal_bss *bss, char *current_ev, in ieee80211_bss() argument
874 u8 *ie = bss->pub.information_elements; in ieee80211_bss()
875 int rem = bss->pub.len_information_elements, i, sig; in ieee80211_bss()
881 memcpy(iwe.u.ap_addr.sa_data, bss->pub.bssid, ETH_ALEN); in ieee80211_bss()
887 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->pub.channel->center_freq); in ieee80211_bss()
894 iwe.u.freq.m = bss->pub.channel->center_freq; in ieee80211_bss()
907 sig = bss->pub.signal / 100; in ieee80211_bss()
918 iwe.u.qual.level = bss->pub.signal; in ieee80211_bss()
920 iwe.u.qual.qual = bss->pub.signal; in ieee80211_bss()
932 if (bss->pub.capability & WLAN_CAPABILITY_PRIVACY) in ieee80211_bss()
1035 if (bss->pub.capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS) || in ieee80211_bss()
1041 else if (bss->pub.capability & WLAN_CAPABILITY_ESS) in ieee80211_bss()
1053 sprintf(buf, "tsf=%016llx", (unsigned long long)(bss->pub.tsf)); in ieee80211_bss()
1060 elapsed_jiffies_msecs(bss->ts)); in ieee80211_bss()
1067 ieee80211_scan_add_ies(info, &bss->pub, ¤t_ev, end_buf); in ieee80211_bss()
1079 struct cfg80211_internal_bss *bss; in ieee80211_scan_results() local
1084 list_for_each_entry(bss, &dev->bss_list, list) { in ieee80211_scan_results()
1089 current_ev = ieee80211_bss(&dev->wiphy, info, bss, in ieee80211_scan_results()