Skip to content

Commit

Permalink
mac80211: disassociate when moving to new BSS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Sep 11, 2008
1 parent aa458d1 commit 3b7ee69
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -3271,9 +3271,14 @@ void ieee80211_sta_req_auth(struct ieee80211_sub_if_data *sdata,
return;

if ((ifsta->flags & (IEEE80211_STA_BSSID_SET |
IEEE80211_STA_AUTO_BSSID_SEL)) &&
IEEE80211_STA_AUTO_BSSID_SEL)) &&
(ifsta->flags & (IEEE80211_STA_SSID_SET |
IEEE80211_STA_AUTO_SSID_SEL))) {
IEEE80211_STA_AUTO_SSID_SEL))) {

if (ifsta->state == IEEE80211_STA_MLME_ASSOCIATED)
ieee80211_set_disassoc(sdata, ifsta, true, true,
WLAN_REASON_DEAUTH_LEAVING);

set_bit(IEEE80211_STA_REQ_AUTH, &ifsta->request);
queue_work(local->hw.workqueue, &ifsta->work);
}
Expand Down

0 comments on commit 3b7ee69

Please sign in to comment.