Lines Matching defs:bss
80 static void bss_free(struct cfg80211_internal_bss *bss)
84 if (WARN_ON(atomic_read(&bss->hold)))
87 ies = (void *)rcu_access_pointer(bss->pub.beacon_ies);
88 if (ies && !bss->pub.hidden_beacon_bss)
90 ies = (void *)rcu_access_pointer(bss->pub.proberesp_ies);
98 if (!list_empty(&bss->hidden_list))
99 list_del(&bss->hidden_list);
101 kfree(bss);
105 struct cfg80211_internal_bss *bss)
109 bss->refcount++;
111 if (bss->pub.hidden_beacon_bss)
112 bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
114 if (bss->pub.transmitted_bss)
115 bss_from_pub(bss->pub.transmitted_bss)->refcount++;
119 struct cfg80211_internal_bss *bss)
123 if (bss->pub.hidden_beacon_bss) {
126 hbss = bss_from_pub(bss->pub.hidden_beacon_bss);
132 if (bss->pub.transmitted_bss) {
135 tbss = bss_from_pub(bss->pub.transmitted_bss);
141 bss->refcount--;
142 if (bss->refcount == 0)
143 bss_free(bss);
147 struct cfg80211_internal_bss *bss)
151 if (!list_empty(&bss->hidden_list)) {
156 if (!bss->pub.hidden_beacon_bss)
162 list_del_init(&bss->hidden_list);
165 list_del_init(&bss->list);
166 list_del_init(&bss->pub.nontrans_list);
167 rb_erase(&bss->rbn, &rdev->bss_tree);
170 "rdev bss entries[%d]/list[empty:%d] corruption\n",
172 bss_ref_put(rdev, bss);
434 struct cfg80211_bss *bss = NULL;
444 list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) {
445 if (is_bss(bss, nontrans_bss->bssid, ssid_elem->data,
471 struct cfg80211_internal_bss *bss, *tmp;
476 list_for_each_entry_safe(bss, tmp, &rdev->bss_list, list) {
477 if (atomic_read(&bss->hold))
479 if (!time_after(expire_time, bss->ts))
482 if (__cfg80211_unlink_bss(rdev, bss))
492 struct cfg80211_internal_bss *bss, *oldest = NULL;
497 list_for_each_entry(bss, &rdev->bss_list, list) {
498 if (atomic_read(&bss->hold))
501 if (!list_empty(&bss->hidden_list) &&
502 !bss->pub.hidden_beacon_bss)
505 if (oldest && time_before(oldest->ts, bss->ts))
507 oldest = bss;
720 /* TBTT info must include bss param + BSSID + (short SSID or
1367 struct cfg80211_internal_bss *bss;
1371 list_for_each_entry(bss, &rdev->bss_list, list)
1372 bss->ts -= age_jiffies;
1588 /* Returned bss is reference counted and must be cleaned up appropriately. */
1598 struct cfg80211_internal_bss *bss, *res = NULL;
1607 list_for_each_entry(bss, &rdev->bss_list, list) {
1608 if (!cfg80211_bss_type_match(bss->pub.capability,
1609 bss->pub.channel->band, bss_type))
1612 bss_privacy = (bss->pub.capability & WLAN_CAPABILITY_PRIVACY);
1616 if (channel && bss->pub.channel != channel)
1618 if (!is_valid_ether_addr(bss->pub.bssid))
1620 if ((bss->pub.use_for & use_for) != use_for)
1623 if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) &&
1624 !atomic_read(&bss->hold))
1626 if (is_bss(&bss->pub, bssid, ssid, ssid_len)) {
1627 res = bss;
1642 struct cfg80211_internal_bss *bss)
1653 cmp = cmp_bss(&bss->pub, &tbss->pub, BSS_CMP_REGULAR);
1666 rb_link_node(&bss->rbn, parent, p);
1667 rb_insert_color(&bss->rbn, &rdev->bss_tree);
1677 struct cfg80211_internal_bss *bss;
1681 bss = rb_entry(n, struct cfg80211_internal_bss, rbn);
1682 r = cmp_bss(&res->pub, &bss->pub, mode);
1685 return bss;
1696 struct cfg80211_internal_bss *bss)
1700 if (!rb_insert_bss(rdev, bss))
1702 list_add_tail(&bss->list, &rdev->bss_list);
1707 struct cfg80211_internal_bss *bss)
1711 rb_erase(&bss->rbn, &rdev->bss_tree);
1712 if (!rb_insert_bss(rdev, bss)) {
1713 list_del(&bss->list);
1714 if (!list_empty(&bss->hidden_list))
1715 list_del_init(&bss->hidden_list);
1716 if (!list_empty(&bss->pub.nontrans_list))
1717 list_del_init(&bss->pub.nontrans_list);
1727 struct cfg80211_internal_bss *bss;
1754 list_for_each_entry(bss, &rdev->bss_list, list) {
1761 if (!ether_addr_equal(bss->pub.bssid, new->pub.bssid))
1763 if (bss->pub.channel != new->pub.channel)
1765 if (rcu_access_pointer(bss->pub.beacon_ies))
1767 ies = rcu_access_pointer(bss->pub.ies);
1775 if (WARN_ON_ONCE(bss->pub.hidden_beacon_bss))
1777 if (WARN_ON_ONCE(!list_empty(&bss->hidden_list)))
1778 list_del(&bss->hidden_list);
1780 list_add(&bss->hidden_list, &new->hidden_list);
1781 bss->pub.hidden_beacon_bss = &new->pub;
1782 new->refcount += bss->refcount;
1783 rcu_assign_pointer(bss->pub.beacon_ies,
1788 "rdev bss entries[%d]/list[len:%d] corruption\n",
1798 struct cfg80211_internal_bss *bss;
1801 list_for_each_entry(bss, &known->hidden_list, hidden_list) {
1804 ies = rcu_access_pointer(bss->pub.beacon_ies);
1807 rcu_assign_pointer(bss->pub.beacon_ies, new_ies);
1901 * bss is used). This can only mean that the
1952 /* Returned bss is reference counted and must be cleaned up appropriately. */
2246 /* Returned bss is reference counted and must be cleaned up appropriately. */
2370 /* this is a nontransmitting bss, we need to add it to
2371 * transmitting bss' list if it is not there
2486 struct cfg80211_bss *bss;
2578 bss = cfg80211_inform_single_bss_data(wiphy, &data, gfp);
2579 if (!bss)
2581 cfg80211_put_bss(wiphy, bss);
2948 struct cfg80211_bss *bss;
3094 bss = cfg80211_get_bss(wiphy, data.channel, data.bssid, ssid,
3097 if (bss) {
3098 struct cfg80211_internal_bss *ibss = bss_from_pub(bss);
3100 if (data.capability == bss->capability &&
3102 cfg80211_put_bss(wiphy, bss);
3105 cfg80211_put_bss(wiphy, bss);
3166 bss = cfg80211_inform_single_bss_data(wiphy, &data, gfp);
3167 if (!bss)
3169 cfg80211_put_bss(wiphy, bss);
3353 struct cfg80211_internal_bss *bss, *tmp1;
3359 bss = bss_from_pub(pub);
3362 if (list_empty(&bss->list))
3373 if (__cfg80211_unlink_bss(rdev, bss))
3383 struct cfg80211_bss *bss,
3388 struct cfg80211_internal_bss *bss;
3392 list_for_each_entry(bss, &rdev->bss_list, list) {
3393 if (!chandef || cfg80211_is_sub_chan(chandef, bss->pub.channel,
3395 iter(wiphy, &bss->pub, iter_data);
3410 struct cfg80211_internal_bss *bss;
3423 /* use transmitting bss */
3429 list_for_each_entry(bss, &rdev->bss_list, list) {
3430 if (!cfg80211_bss_type_match(bss->pub.capability,
3431 bss->pub.channel->band,
3435 if (bss == cbss)
3438 if (!cmp_bss(&bss->pub, &cbss->pub, BSS_CMP_REGULAR)) {
3439 new = bss;
3445 /* to save time, update IEs for transmitting bss only */
3453 bss = bss_from_pub(nontrans_bss);
3454 if (__cfg80211_unlink_bss(rdev, bss))
3467 bss = bss_from_pub(nontrans_bss);
3468 bss->pub.channel = chan;
3469 cfg80211_rehash_bss(rdev, bss);
3686 struct cfg80211_internal_bss *bss, char *current_ev,
3700 memcpy(iwe.u.ap_addr.sa_data, bss->pub.bssid, ETH_ALEN);
3708 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->pub.channel->center_freq);
3717 iwe.u.freq.m = bss->pub.channel->center_freq;
3732 sig = bss->pub.signal / 100;
3743 iwe.u.qual.level = bss->pub.signal;
3745 iwe.u.qual.qual = bss->pub.signal;
3760 if (bss->pub.capability & WLAN_CAPABILITY_PRIVACY)
3771 ies = rcu_dereference(bss->pub.ies);
3905 if (bss->pub.capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS) ||
3911 else if (bss->pub.capability & WLAN_CAPABILITY_ESS)
3933 elapsed_jiffies_msecs(bss->ts));
3953 struct cfg80211_internal_bss *bss;
3959 list_for_each_entry(bss, &rdev->bss_list, list) {
3964 current_ev = ieee80211_bss(&rdev->wiphy, info, bss,