Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135265
b: refs/heads/master
c: 1a28c78
h: refs/heads/master
i:
  135263: 9aa5a81
v: v3
  • Loading branch information
Herton Ronaldo Krzesinski authored and John W. Linville committed Mar 16, 2009
1 parent 811bb26 commit c924111
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: af88b9078d4aa31d667d2d82601ede9cae3bac37
refs/heads/master: 1a28c78b46caec7628985728e7f0c4aef68e33e7
16 changes: 12 additions & 4 deletions trunk/net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c924111

Please sign in to comment.