mac80211: deauth when interface is marked down

It seems like proper etiquette to let other stations know when we are
going down in either STA or IBSS mode.  This also notifies userland, so
wpa_supplicant doesn't get confused.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
John W. Linville 2008-12-01 14:56:41 -05:00
Родитель 04adf89066
Коммит e327b847e6
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -435,7 +435,11 @@ static int ieee80211_stop(struct net_device *dev)
break; break;
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_ADHOC: case NL80211_IFTYPE_ADHOC:
sdata->u.sta.state = IEEE80211_STA_MLME_DISABLED; /* Announce that we are leaving the network. */
if (sdata->u.sta.state != IEEE80211_STA_MLME_DISABLED)
ieee80211_sta_deauthenticate(sdata,
WLAN_REASON_DEAUTH_LEAVING);
memset(sdata->u.sta.bssid, 0, ETH_ALEN); memset(sdata->u.sta.bssid, 0, ETH_ALEN);
del_timer_sync(&sdata->u.sta.timer); del_timer_sync(&sdata->u.sta.timer);
/* /*