summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-03-19 14:39:20 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-03-28 03:13:01 +0300
commita299542e97ec1939fdca7db6d3d82c0aa9bf8b9a (patch)
treef7af1607553e08ec9c6fde0e8430a0a2b003a384 /net
parent4b4698c443c9db62b220c41a1793872d6ebe82e1 (diff)
downloadlinux-a299542e97ec1939fdca7db6d3d82c0aa9bf8b9a.tar.xz
mac80211: Fix reassociation by not clearing previous BSSID
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> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 4c753bb43ba9..1f49b63d8dd2 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1888,8 +1888,6 @@ int ieee80211_sta_commit(struct ieee80211_sub_if_data *sdata)
{
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 ieee80211_sub_if_data *sdata, char *ssid, size
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;