diff options
author | David S. Miller <davem@davemloft.net> | 2009-03-17 23:04:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-17 23:04:31 +0100 |
commit | af4330631cd48987755f1a8d324dc318f60cf16b (patch) | |
tree | 3c9233e81b450921326da13a7f8abacb58ab1f5e /net/mac80211/iface.c | |
parent | Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/ne... (diff) | |
parent | iwlwifi: correct log level when error occurs (diff) | |
download | linux-af4330631cd48987755f1a8d324dc318f60cf16b.tar.xz linux-af4330631cd48987755f1a8d324dc318f60cf16b.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r-- | net/mac80211/iface.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index 2acc416e77e1..f9f27b9cadbe 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c @@ -370,6 +370,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. * * This must be done before calling ops->remove_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); |