aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-09-08 11:33:38 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-11 15:53:35 -0400
commit3b7ee69d0caefbdb85a606a98bff841b8c63b97e (patch)
tree3c8e58cdef2d410f8c911a944a2e6e853e19c5f9 /net
parentaa458d1737c3cc9a7c90ea9c5ef1ee6d663fba71 (diff)
mac80211: disassociate when moving to new BSS
This patch makes the MLME cleanly disassociate from the current BSS when leaving it for a new one. This is not just nicer to the old AP (we're leaving it, might as well tell it!) but also required for some drivers that keep track of the station we're associated with, they'd get confused because they'd think we are associated with two APs. Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index f7a390ff9679..eababf320b83 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3271,9 +3271,14 @@ void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata,
3271 return; 3271 return;
3272 3272
3273 if ((ifsta->flags & (IEEE80211_STA_BSSID_SET | 3273 if ((ifsta->flags & (IEEE80211_STA_BSSID_SET |
3274 IEEE80211_STA_AUTO_BSSID_SEL)) && 3274 IEEE80211_STA_AUTO_BSSID_SEL)) &&
3275 (ifsta->flags & (IEEE80211_STA_SSID_SET | 3275 (ifsta->flags & (IEEE80211_STA_SSID_SET |
3276 IEEE80211_STA_AUTO_SSID_SEL))) { 3276 IEEE80211_STA_AUTO_SSID_SEL))) {
3277
3278 if (ifsta->state == IEEE80211_STA_MLME_ASSOCIATED)
3279 ieee80211_set_disassoc(sdata, ifsta, true, true,
3280 WLAN_REASON_DEAUTH_LEAVING);
3281
3277 set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request); 3282 set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
3278 queue_work(local->hw.workqueue, &ifsta->work); 3283 queue_work(local->hw.workqueue, &ifsta->work);
3279 } 3284 }