diff options
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index c0a5345c8a61..a5e5c31c23ab 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2248,10 +2248,13 @@ static void ieee80211_rx_bss_put(struct net_device *dev, | |||
2248 | struct ieee80211_sta_bss *bss) | 2248 | struct ieee80211_sta_bss *bss) |
2249 | { | 2249 | { |
2250 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 2250 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
2251 | if (!atomic_dec_and_test(&bss->users)) | 2251 | |
2252 | local_bh_disable(); | ||
2253 | if (!atomic_dec_and_lock(&bss->users, &local->sta_bss_lock)) { | ||
2254 | local_bh_enable(); | ||
2252 | return; | 2255 | return; |
2256 | } | ||
2253 | 2257 | ||
2254 | spin_lock_bh(&local->sta_bss_lock); | ||
2255 | __ieee80211_rx_bss_hash_del(dev, bss); | 2258 | __ieee80211_rx_bss_hash_del(dev, bss); |
2256 | list_del(&bss->list); | 2259 | list_del(&bss->list); |
2257 | spin_unlock_bh(&local->sta_bss_lock); | 2260 | spin_unlock_bh(&local->sta_bss_lock); |