Lines Matching defs:bss

116 static void bss_free(struct cfg80211_internal_bss *bss)
120 if (WARN_ON(atomic_read(&bss->hold)))
123 ies = (void *)rcu_access_pointer(bss->pub.beacon_ies);
124 if (ies && !bss->pub.hidden_beacon_bss)
126 ies = (void *)rcu_access_pointer(bss->pub.proberesp_ies);
134 if (!list_empty(&bss->hidden_list))
135 list_del(&bss->hidden_list);
137 kfree(bss);
141 struct cfg80211_internal_bss *bss)
145 bss->refcount++;
147 if (bss->pub.hidden_beacon_bss)
148 bss_from_pub(bss->pub.hidden_beacon_bss)->refcount++;
150 if (bss->pub.transmitted_bss)
151 bss_from_pub(bss->pub.transmitted_bss)->refcount++;
155 struct cfg80211_internal_bss *bss)
159 if (bss->pub.hidden_beacon_bss) {
161 hbss = container_of(bss->pub.hidden_beacon_bss,
169 if (bss->pub.transmitted_bss) {
172 tbss = container_of(bss->pub.transmitted_bss,
180 bss->refcount--;
181 if (bss->refcount == 0)
182 bss_free(bss);
186 struct cfg80211_internal_bss *bss)
190 if (!list_empty(&bss->hidden_list)) {
195 if (!bss->pub.hidden_beacon_bss)
201 list_del_init(&bss->hidden_list);
204 list_del_init(&bss->list);
205 list_del_init(&bss->pub.nontrans_list);
206 rb_erase(&bss->rbn, &rdev->bss_tree);
209 "rdev bss entries[%d]/list[empty:%d] corruption\n",
211 bss_ref_put(rdev, bss);
443 struct cfg80211_bss *bss = NULL;
455 list_for_each_entry(bss, &trans_bss->nontrans_list, nontrans_list) {
456 if (is_bss(bss, nontrans_bss->bssid, ssid, ssid_len)) {
481 struct cfg80211_internal_bss *bss, *tmp;
486 list_for_each_entry_safe(bss, tmp, &rdev->bss_list, list) {
487 if (atomic_read(&bss->hold))
489 if (!time_after(expire_time, bss->ts))
492 if (__cfg80211_unlink_bss(rdev, bss))
502 struct cfg80211_internal_bss *bss, *oldest = NULL;
507 list_for_each_entry(bss, &rdev->bss_list, list) {
508 if (atomic_read(&bss->hold))
511 if (!list_empty(&bss->hidden_list) &&
512 !bss->pub.hidden_beacon_bss)
515 if (oldest && time_before(oldest->ts, bss->ts))
517 oldest = bss;
669 * TBTT info must include bss param + BSSID +
1243 struct cfg80211_internal_bss *bss;
1247 list_for_each_entry(bss, &rdev->bss_list, list)
1248 bss->ts -= age_jiffies;
1463 /* Returned bss is reference counted and must be cleaned up appropriately. */
1472 struct cfg80211_internal_bss *bss, *res = NULL;
1481 list_for_each_entry(bss, &rdev->bss_list, list) {
1482 if (!cfg80211_bss_type_match(bss->pub.capability,
1483 bss->pub.channel->band, bss_type))
1486 bss_privacy = (bss->pub.capability & WLAN_CAPABILITY_PRIVACY);
1490 if (channel && bss->pub.channel != channel)
1492 if (!is_valid_ether_addr(bss->pub.bssid))
1495 if (time_after(now, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE) &&
1496 !atomic_read(&bss->hold))
1498 if (is_bss(&bss->pub, bssid, ssid, ssid_len)) {
1499 res = bss;
1514 struct cfg80211_internal_bss *bss)
1525 cmp = cmp_bss(&bss->pub, &tbss->pub, BSS_CMP_REGULAR);
1538 rb_link_node(&bss->rbn, parent, p);
1539 rb_insert_color(&bss->rbn, &rdev->bss_tree);
1548 struct cfg80211_internal_bss *bss;
1552 bss = rb_entry(n, struct cfg80211_internal_bss, rbn);
1553 r = cmp_bss(&res->pub, &bss->pub, mode);
1556 return bss;
1570 struct cfg80211_internal_bss *bss;
1597 list_for_each_entry(bss, &rdev->bss_list, list) {
1604 if (!ether_addr_equal(bss->pub.bssid, new->pub.bssid))
1606 if (bss->pub.channel != new->pub.channel)
1608 if (bss->pub.scan_width != new->pub.scan_width)
1610 if (rcu_access_pointer(bss->pub.beacon_ies))
1612 ies = rcu_access_pointer(bss->pub.ies);
1620 if (WARN_ON_ONCE(bss->pub.hidden_beacon_bss))
1622 if (WARN_ON_ONCE(!list_empty(&bss->hidden_list)))
1623 list_del(&bss->hidden_list);
1625 list_add(&bss->hidden_list, &new->hidden_list);
1626 bss->pub.hidden_beacon_bss = &new->pub;
1627 new->refcount += bss->refcount;
1628 rcu_assign_pointer(bss->pub.beacon_ies,
1633 "rdev bss entries[%d]/list[len:%d] corruption\n",
1649 struct cfg80211_internal_bss *bss;
1652 list_for_each_entry(bss, &known->hidden_list, hidden_list) {
1655 ies = rcu_access_pointer(bss->pub.beacon_ies);
1658 rcu_assign_pointer(bss->pub.beacon_ies, new_ies);
1693 * bss is used). This can only mean that the
1741 /* Returned bss is reference counted and must be cleaned up appropriately. */
1937 /* Returned bss is reference counted and must be cleaned up appropriately. */
2028 /* this is a nontransmitting bss, we need to add it to
2029 * transmitting bss' list if it is not there
2138 struct cfg80211_bss *bss;
2221 bss = cfg80211_inform_single_bss_data(wiphy, data,
2230 if (!bss)
2232 cfg80211_put_bss(wiphy, bss);
2530 /* process each non-transmitting bss */
2536 /* check if the res has other nontransmitting bss which is not
2561 struct cfg80211_internal_bss *bss;
2566 bss = container_of(pub, struct cfg80211_internal_bss, pub);
2569 bss_ref_get(rdev, bss);
2577 struct cfg80211_internal_bss *bss;
2582 bss = container_of(pub, struct cfg80211_internal_bss, pub);
2585 bss_ref_put(rdev, bss);
2593 struct cfg80211_internal_bss *bss, *tmp1;
2599 bss = container_of(pub, struct cfg80211_internal_bss, pub);
2602 if (list_empty(&bss->list))
2614 if (__cfg80211_unlink_bss(rdev, bss))
2624 struct cfg80211_bss *bss,
2629 struct cfg80211_internal_bss *bss;
2633 list_for_each_entry(bss, &rdev->bss_list, list) {
2634 if (!chandef || cfg80211_is_sub_chan(chandef, bss->pub.channel))
2635 iter(wiphy, &bss->pub, iter_data);
2649 struct cfg80211_internal_bss *bss;
2662 /* use transmitting bss */
2670 list_for_each_entry(bss, &rdev->bss_list, list) {
2671 if (!cfg80211_bss_type_match(bss->pub.capability,
2672 bss->pub.channel->band,
2676 if (bss == cbss)
2679 if (!cmp_bss(&bss->pub, &cbss->pub, BSS_CMP_REGULAR)) {
2680 new = bss;
2686 /* to save time, update IEs for transmitting bss only */
2695 bss = container_of(nontrans_bss,
2697 if (__cfg80211_unlink_bss(rdev, bss))
2713 bss = container_of(nontrans_bss,
2715 bss->pub.channel = chan;
2716 rb_erase(&bss->rbn, &rdev->bss_tree);
2717 rb_insert_bss(rdev, bss);
2934 struct cfg80211_internal_bss *bss, char *current_ev,
2948 memcpy(iwe.u.ap_addr.sa_data, bss->pub.bssid, ETH_ALEN);
2956 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->pub.channel->center_freq);
2965 iwe.u.freq.m = bss->pub.channel->center_freq;
2980 sig = bss->pub.signal / 100;
2991 iwe.u.qual.level = bss->pub.signal;
2993 iwe.u.qual.qual = bss->pub.signal;
3008 if (bss->pub.capability & WLAN_CAPABILITY_PRIVACY)
3019 ies = rcu_dereference(bss->pub.ies);
3149 if (bss->pub.capability & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS) ||
3155 else if (bss->pub.capability & WLAN_CAPABILITY_ESS)
3177 elapsed_jiffies_msecs(bss->ts));
3198 struct cfg80211_internal_bss *bss;
3204 list_for_each_entry(bss, &rdev->bss_list, list) {
3209 current_ev = ieee80211_bss(&rdev->wiphy, info, bss,