From c9241115bb1d755bf2d486f492658827b2a80c48 Mon Sep 17 00:00:00 2001 From: Herton Ronaldo Krzesinski Date: Tue, 10 Mar 2009 10:11:09 -0300 Subject: [PATCH] --- yaml --- r: 135265 b: refs/heads/master c: 1a28c78b46caec7628985728e7f0c4aef68e33e7 h: refs/heads/master i: 135263: 9aa5a81df33a4478a67e0374b33fea003cade274 v: v3 --- [refs] | 2 +- trunk/net/mac80211/iface.c | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 72f1fcb9e7e0..bf854c6cf452 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: af88b9078d4aa31d667d2d82601ede9cae3bac37 +refs/heads/master: 1a28c78b46caec7628985728e7f0c4aef68e33e7 diff --git a/trunk/net/mac80211/iface.c b/trunk/net/mac80211/iface.c index 2acc416e77e1..f9f27b9cadbe 100644 --- a/trunk/net/mac80211/iface.c +++ b/trunk/net/mac80211/iface.c @@ -369,6 +369,18 @@ static int ieee80211_stop(struct net_device *dev) rcu_read_unlock(); + /* + * Announce that we are leaving the network, in case we are a + * station interface type. This must be done before removing + * all stations associated with sta_info_flush, otherwise STA + * information will be gone and no announce being done. + */ + if (sdata->vif.type == NL80211_IFTYPE_STATION) { + if (sdata->u.mgd.state != IEEE80211_STA_MLME_DISABLED) + ieee80211_sta_deauthenticate(sdata, + WLAN_REASON_DEAUTH_LEAVING); + } + /* * Remove all stations associated with this interface. * @@ -454,10 +466,6 @@ static int ieee80211_stop(struct net_device *dev) netif_addr_unlock_bh(local->mdev); break; case NL80211_IFTYPE_STATION: - /* Announce that we are leaving the network. */ - if (sdata->u.mgd.state != IEEE80211_STA_MLME_DISABLED) - ieee80211_sta_deauthenticate(sdata, - WLAN_REASON_DEAUTH_LEAVING); memset(sdata->u.mgd.bssid, 0, ETH_ALEN); del_timer_sync(&sdata->u.mgd.chswitch_timer); del_timer_sync(&sdata->u.mgd.timer);