From: Jouni Malinen <jouni.malinen@atheros.com>
To: "John W. Linville" <linville@tuxdriver.com>,
Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless@vger.kernel.org,
Jouni Malinen <jouni.malinen@atheros.com>
Subject: [PATCH 2/4] mac80211: Fix reassociation by not clearing previous BSSID
Date: Thu, 19 Mar 2009 13:39:20 +0200 [thread overview]
Message-ID: <20090319114800.533740586@atheros.com> (raw)
In-Reply-To: 20090319113918.555693846@atheros.com
We must not clear the previous BSSID when roaming to another AP within
the same ESS for reassociation to be used properly. It is fine to
clear this when the SSID changes, so let's move the code into
ieee80211_sta_set_ssid().
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
---
net/mac80211/mlme.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- uml.orig/net/mac80211/mlme.c 2009-03-19 00:20:04.000000000 +0200
+++ uml/net/mac80211/mlme.c 2009-03-19 00:20:52.000000000 +0200
@@ -1888,8 +1888,6 @@ int ieee80211_sta_commit(struct ieee8021
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
- ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
-
if (ifmgd->ssid_len)
ifmgd->flags |= IEEE80211_STA_SSID_SET;
else
@@ -1908,6 +1906,10 @@ int ieee80211_sta_set_ssid(struct ieee80
ifmgd = &sdata->u.mgd;
if (ifmgd->ssid_len != len || memcmp(ifmgd->ssid, ssid, len) != 0) {
+ /*
+ * Do not use reassociation if SSID is changed (different ESS).
+ */
+ ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
memset(ifmgd->ssid, 0, sizeof(ifmgd->ssid));
memcpy(ifmgd->ssid, ssid, len);
ifmgd->ssid_len = len;
--
--
Jouni Malinen PGP id EFC895FA
next prev parent reply other threads:[~2009-03-19 11:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-19 11:39 [PATCH 0/4] nl80211/mac80211: Add MLME primitives for auth/assoc Jouni Malinen
2009-03-19 11:39 ` [PATCH 1/4] mac80211: Fix a typo in assoc vs. reassoc check Jouni Malinen
2009-03-19 18:45 ` Johannes Berg
2009-03-19 11:39 ` Jouni Malinen [this message]
2009-03-19 18:45 ` [PATCH 2/4] mac80211: Fix reassociation by not clearing previous BSSID Johannes Berg
2009-03-19 11:39 ` [PATCH 3/4] nl80211: Event notifications for MLME events Jouni Malinen
2009-03-19 18:47 ` Johannes Berg
2009-03-19 11:39 ` [PATCH 4/4] nl80211: Add MLME primitives to support external SME Jouni Malinen
2009-03-19 18:59 ` Johannes Berg
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=20090319114800.533740586@atheros.com \
--to=jouni.malinen@atheros.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.