Commit e0da41b2 authored by Holger Schurig's avatar Holger Schurig Committed by John W. Linville

cfg80211: remove warning in deauth case

It might be the case that __cfg80211_disconnected() has already
cleaned up wdev->current_bss() for us. The old code didn't catch
that situation and didn't warn needlessly.
Signed-off-by: default avatarHolger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ce470613
...@@ -130,7 +130,6 @@ void __cfg80211_send_deauth(struct net_device *dev, ...@@ -130,7 +130,6 @@ void __cfg80211_send_deauth(struct net_device *dev,
struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf;
const u8 *bssid = mgmt->bssid; const u8 *bssid = mgmt->bssid;
int i; int i;
bool done = false;
ASSERT_WDEV_LOCK(wdev); ASSERT_WDEV_LOCK(wdev);
...@@ -138,7 +137,6 @@ void __cfg80211_send_deauth(struct net_device *dev, ...@@ -138,7 +137,6 @@ void __cfg80211_send_deauth(struct net_device *dev,
if (wdev->current_bss && if (wdev->current_bss &&
memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) { memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) {
done = true;
cfg80211_unhold_bss(wdev->current_bss); cfg80211_unhold_bss(wdev->current_bss);
cfg80211_put_bss(&wdev->current_bss->pub); cfg80211_put_bss(&wdev->current_bss->pub);
wdev->current_bss = NULL; wdev->current_bss = NULL;
...@@ -148,7 +146,6 @@ void __cfg80211_send_deauth(struct net_device *dev, ...@@ -148,7 +146,6 @@ void __cfg80211_send_deauth(struct net_device *dev,
cfg80211_unhold_bss(wdev->auth_bsses[i]); cfg80211_unhold_bss(wdev->auth_bsses[i]);
cfg80211_put_bss(&wdev->auth_bsses[i]->pub); cfg80211_put_bss(&wdev->auth_bsses[i]->pub);
wdev->auth_bsses[i] = NULL; wdev->auth_bsses[i] = NULL;
done = true;
break; break;
} }
if (wdev->authtry_bsses[i] && if (wdev->authtry_bsses[i] &&
...@@ -156,13 +153,10 @@ void __cfg80211_send_deauth(struct net_device *dev, ...@@ -156,13 +153,10 @@ void __cfg80211_send_deauth(struct net_device *dev,
cfg80211_unhold_bss(wdev->authtry_bsses[i]); cfg80211_unhold_bss(wdev->authtry_bsses[i]);
cfg80211_put_bss(&wdev->authtry_bsses[i]->pub); cfg80211_put_bss(&wdev->authtry_bsses[i]->pub);
wdev->authtry_bsses[i] = NULL; wdev->authtry_bsses[i] = NULL;
done = true;
break; break;
} }
} }
WARN_ON(!done);
if (wdev->sme_state == CFG80211_SME_CONNECTED) { if (wdev->sme_state == CFG80211_SME_CONNECTED) {
u16 reason_code; u16 reason_code;
bool from_ap; bool from_ap;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment