From: Johannes Berg <johannes@sipsolutions.net>
To: John Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, tomasw@gmail.com,
Ron Rindjunsky <ron.rindjunsky@intel.com>,
Tomas Winkler <tomas.winkler@intel.com>
Subject: [PATCH 2/4] mac80211: disassociate when moving to new BSS
Date: Mon, 08 Sep 2008 17:33:38 +0200 [thread overview]
Message-ID: <20080908153509.159561000@sipsolutions.net> (raw)
In-Reply-To: 20080908153336.891710000@sipsolutions.net
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>
---
net/mac80211/mlme.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- everything.orig/net/mac80211/mlme.c 2008-09-08 16:39:55.000000000 +0200
+++ everything/net/mac80211/mlme.c 2008-09-08 16:39:57.000000000 +0200
@@ -3272,9 +3272,14 @@ void ieee80211_sta_req_auth(struct ieee8
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);
}
--
next prev parent reply other threads:[~2008-09-08 15:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-08 15:33 [PATCH 0/4] mac80211 disassociation fixes Johannes Berg
2008-09-08 15:33 ` [PATCH 1/4] mac80211: restructure disassoc/deauth flows Johannes Berg
2008-09-08 15:33 ` Johannes Berg [this message]
2008-09-08 15:33 ` [PATCH 3/4] mac80211: remove disassociation code from ieee80211_set_associated Johannes Berg
2008-09-08 15:33 ` [PATCH 4/4] mac80211: stop queues before carrier off Johannes Berg
2008-09-08 15:48 ` Johannes Berg
2008-09-08 21:40 ` Tomas Winkler
2008-09-08 21:44 ` Dan Williams
2008-09-08 22:08 ` Tomas Winkler
2008-09-08 22:29 ` Matthew Garrett
2008-09-08 23:32 ` Tomas Winkler
2008-09-08 23:37 ` Matthew Garrett
2008-09-09 0:51 ` Tomas Winkler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080908153509.159561000@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=ron.rindjunsky@intel.com \
--cc=tomas.winkler@intel.com \
--cc=tomasw@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).