Skip to content

Commit a299542

Browse files
Jouni Malinenlinvjw
authored andcommitted
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>
1 parent 4b4698c commit a299542

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎net/mac80211/mlme.c‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,8 +1888,6 @@ int ieee80211_sta_commit(struct ieee80211_sub_if_data *sdata)
18881888
{
18891889
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
18901890

1891-
ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
1892-
18931891
if (ifmgd->ssid_len)
18941892
ifmgd->flags |= IEEE80211_STA_SSID_SET;
18951893
else
@@ -1908,6 +1906,10 @@ int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size
19081906
ifmgd = &sdata->u.mgd;
19091907

19101908
if (ifmgd->ssid_len != len || memcmp(ifmgd->ssid, ssid, len) != 0) {
1909+
/*
1910+
* Do not use reassociation if SSID is changed (different ESS).
1911+
*/
1912+
ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
19111913
memset(ifmgd->ssid, 0, sizeof(ifmgd->ssid));
19121914
memcpy(ifmgd->ssid, ssid, len);
19131915
ifmgd->ssid_len = len;

0 commit comments

Comments
 (0)