diff options
author | Holger Schurig <hs4233@mail.mn-solutions.de> | 2009-10-13 07:45:28 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 16:48:17 -0400 |
commit | e0da41b2cf10ae95592cb2496f8f81aa4b4bf16c (patch) | |
tree | e8bb61adc3f5f01e61b596056f3608414aea5b45 /net | |
parent | ce470613cdfde70f25419cc52a4816315825f5d9 (diff) |
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: Holger Schurig <hs4233@mail.mn-solutions.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/mlme.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index a13a71205240..1f87b4e7f4f7 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -130,7 +130,6 @@ void __cfg80211_send_deauth(struct net_device *dev, | |||
130 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; | 130 | struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)buf; |
131 | const u8 *bssid = mgmt->bssid; | 131 | const u8 *bssid = mgmt->bssid; |
132 | int i; | 132 | int i; |
133 | bool done = false; | ||
134 | 133 | ||
135 | ASSERT_WDEV_LOCK(wdev); | 134 | ASSERT_WDEV_LOCK(wdev); |
136 | 135 | ||
@@ -138,7 +137,6 @@ void __cfg80211_send_deauth(struct net_device *dev, | |||
138 | 137 | ||
139 | if (wdev->current_bss && | 138 | if (wdev->current_bss && |
140 | memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) { | 139 | memcmp(wdev->current_bss->pub.bssid, bssid, ETH_ALEN) == 0) { |
141 | done = true; | ||
142 | cfg80211_unhold_bss(wdev->current_bss); | 140 | cfg80211_unhold_bss(wdev->current_bss); |
143 | cfg80211_put_bss(&wdev->current_bss->pub); | 141 | cfg80211_put_bss(&wdev->current_bss->pub); |
144 | wdev->current_bss = NULL; | 142 | wdev->current_bss = NULL; |
@@ -148,7 +146,6 @@ void __cfg80211_send_deauth(struct net_device *dev, | |||
148 | cfg80211_unhold_bss(wdev->auth_bsses[i]); | 146 | cfg80211_unhold_bss(wdev->auth_bsses[i]); |
149 | cfg80211_put_bss(&wdev->auth_bsses[i]->pub); | 147 | cfg80211_put_bss(&wdev->auth_bsses[i]->pub); |
150 | wdev->auth_bsses[i] = NULL; | 148 | wdev->auth_bsses[i] = NULL; |
151 | done = true; | ||
152 | break; | 149 | break; |
153 | } | 150 | } |
154 | if (wdev->authtry_bsses[i] && | 151 | if (wdev->authtry_bsses[i] && |
@@ -156,13 +153,10 @@ void __cfg80211_send_deauth(struct net_device *dev, | |||
156 | cfg80211_unhold_bss(wdev->authtry_bsses[i]); | 153 | cfg80211_unhold_bss(wdev->authtry_bsses[i]); |
157 | cfg80211_put_bss(&wdev->authtry_bsses[i]->pub); | 154 | cfg80211_put_bss(&wdev->authtry_bsses[i]->pub); |
158 | wdev->authtry_bsses[i] = NULL; | 155 | wdev->authtry_bsses[i] = NULL; |
159 | done = true; | ||
160 | break; | 156 | break; |
161 | } | 157 | } |
162 | } | 158 | } |
163 | 159 | ||
164 | WARN_ON(!done); | ||
165 | |||
166 | if (wdev->sme_state == CFG80211_SME_CONNECTED) { | 160 | if (wdev->sme_state == CFG80211_SME_CONNECTED) { |
167 | u16 reason_code; | 161 | u16 reason_code; |
168 | bool from_ap; | 162 | bool from_ap; |