diff options
-rw-r--r-- | net/mac80211/mlme.c | 6 |
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) | |||
1888 | { | 1888 | { |
1889 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; | 1889 | struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; |
1890 | 1890 | ||
1891 | ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET; | ||
1892 | |||
1893 | if (ifmgd->ssid_len) | 1891 | if (ifmgd->ssid_len) |
1894 | ifmgd->flags |= IEEE80211_STA_SSID_SET; | 1892 | ifmgd->flags |= IEEE80211_STA_SSID_SET; |
1895 | else | 1893 | else |
@@ -1908,6 +1906,10 @@ int ieee80211_sta_set_ssid(struct ieee80211_sub_if_data *sdata, char *ssid, size | |||
1908 | ifmgd = &sdata->u.mgd; | 1906 | ifmgd = &sdata->u.mgd; |
1909 | 1907 | ||
1910 | if (ifmgd->ssid_len != len || memcmp(ifmgd->ssid, ssid, len) != 0) { | 1908 | 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; | ||
1911 | memset(ifmgd->ssid, 0, sizeof(ifmgd->ssid)); | 1913 | memset(ifmgd->ssid, 0, sizeof(ifmgd->ssid)); |
1912 | memcpy(ifmgd->ssid, ssid, len); | 1914 | memcpy(ifmgd->ssid, ssid, len); |
1913 | ifmgd->ssid_len = len; | 1915 | ifmgd->ssid_len = len; |