diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/iface.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 46082125f3e1..9ab772ac74ae 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -435,7 +435,11 @@ static int ieee80211_stop(struct net_device *dev) | |||
435 | break; | 435 | break; |
436 | case NL80211_IFTYPE_STATION: | 436 | case NL80211_IFTYPE_STATION: |
437 | case NL80211_IFTYPE_ADHOC: | 437 | case NL80211_IFTYPE_ADHOC: |
438 | sdata->u.sta.state = IEEE80211_STA_MLME_DISABLED; | 438 | /* Announce that we are leaving the network. */ |
439 | if (sdata->u.sta.state != IEEE80211_STA_MLME_DISABLED) | ||
440 | ieee80211_sta_deauthenticate(sdata, | ||
441 | WLAN_REASON_DEAUTH_LEAVING); | ||
442 | |||
439 | memset(sdata->u.sta.bssid, 0, ETH_ALEN); | 443 | memset(sdata->u.sta.bssid, 0, ETH_ALEN); |
440 | del_timer_sync(&sdata->u.sta.timer); | 444 | del_timer_sync(&sdata->u.sta.timer); |
441 | /* | 445 | /* |