diff options
Diffstat (limited to 'net/wireless/scan.c')
-rw-r--r-- | net/wireless/scan.c | 31 |
1 files changed, 5 insertions, 26 deletions
diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 82b33e708488..925399462a79 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c | |||
@@ -70,6 +70,8 @@ static void bss_release(struct kref *ref) | |||
70 | if (bss->ies_allocated) | 70 | if (bss->ies_allocated) |
71 | kfree(bss->pub.information_elements); | 71 | kfree(bss->pub.information_elements); |
72 | 72 | ||
73 | BUG_ON(atomic_read(&bss->hold)); | ||
74 | |||
73 | kfree(bss); | 75 | kfree(bss); |
74 | } | 76 | } |
75 | 77 | ||
@@ -92,8 +94,9 @@ void cfg80211_bss_expire(struct cfg80211_registered_device *dev) | |||
92 | bool expired = false; | 94 | bool expired = false; |
93 | 95 | ||
94 | list_for_each_entry_safe(bss, tmp, &dev->bss_list, list) { | 96 | list_for_each_entry_safe(bss, tmp, &dev->bss_list, list) { |
95 | if (bss->hold || | 97 | if (atomic_read(&bss->hold)) |
96 | !time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) | 98 | continue; |
99 | if (!time_after(jiffies, bss->ts + IEEE80211_SCAN_RESULT_EXPIRE)) | ||
97 | continue; | 100 | continue; |
98 | list_del(&bss->list); | 101 | list_del(&bss->list); |
99 | rb_erase(&bss->rbn, &dev->bss_tree); | 102 | rb_erase(&bss->rbn, &dev->bss_tree); |
@@ -553,30 +556,6 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *pub) | |||
553 | } | 556 | } |
554 | EXPORT_SYMBOL(cfg80211_unlink_bss); | 557 | EXPORT_SYMBOL(cfg80211_unlink_bss); |
555 | 558 | ||
556 | void cfg80211_hold_bss(struct cfg80211_bss *pub) | ||
557 | { | ||
558 | struct cfg80211_internal_bss *bss; | ||
559 | |||
560 | if (!pub) | ||
561 | return; | ||
562 | |||
563 | bss = container_of(pub, struct cfg80211_internal_bss, pub); | ||
564 | bss->hold = true; | ||
565 | } | ||
566 | EXPORT_SYMBOL(cfg80211_hold_bss); | ||
567 | |||
568 | void cfg80211_unhold_bss(struct cfg80211_bss *pub) | ||
569 | { | ||
570 | struct cfg80211_internal_bss *bss; | ||
571 | |||
572 | if (!pub) | ||
573 | return; | ||
574 | |||
575 | bss = container_of(pub, struct cfg80211_internal_bss, pub); | ||
576 | bss->hold = false; | ||
577 | } | ||
578 | EXPORT_SYMBOL(cfg80211_unhold_bss); | ||
579 | |||
580 | #ifdef CONFIG_WIRELESS_EXT | 559 | #ifdef CONFIG_WIRELESS_EXT |
581 | int cfg80211_wext_siwscan(struct net_device *dev, | 560 | int cfg80211_wext_siwscan(struct net_device *dev, |
582 | struct iw_request_info *info, | 561 | struct iw_request_info *info, |