diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/mlme.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 8e4ce2fdf862..5b9b22120824 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c | |||
@@ -178,12 +178,12 @@ static void __cfg80211_send_disassoc(struct net_device *dev, | |||
178 | bool from_ap; | 178 | bool from_ap; |
179 | bool done = false; | 179 | bool done = false; |
180 | 180 | ||
181 | wdev_lock(wdev); | 181 | ASSERT_WDEV_LOCK(wdev); |
182 | 182 | ||
183 | nl80211_send_disassoc(rdev, dev, buf, len, GFP_KERNEL); | 183 | nl80211_send_disassoc(rdev, dev, buf, len, GFP_KERNEL); |
184 | 184 | ||
185 | if (!wdev->sme_state == CFG80211_SME_CONNECTED) | 185 | if (wdev->sme_state != CFG80211_SME_CONNECTED) |
186 | goto out; | 186 | return; |
187 | 187 | ||
188 | if (wdev->current_bss && | 188 | if (wdev->current_bss && |
189 | memcmp(wdev->current_bss, bssid, ETH_ALEN) == 0) { | 189 | memcmp(wdev->current_bss, bssid, ETH_ALEN) == 0) { |
@@ -205,8 +205,6 @@ static void __cfg80211_send_disassoc(struct net_device *dev, | |||
205 | 205 | ||
206 | from_ap = memcmp(mgmt->da, dev->dev_addr, ETH_ALEN) == 0; | 206 | from_ap = memcmp(mgmt->da, dev->dev_addr, ETH_ALEN) == 0; |
207 | __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap); | 207 | __cfg80211_disconnected(dev, NULL, 0, reason_code, from_ap); |
208 | out: | ||
209 | wdev_unlock(wdev); | ||
210 | } | 208 | } |
211 | 209 | ||
212 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, | 210 | void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, |