summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorEliad Peller <eliad@wizery.com>2012-09-04 16:44:45 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-09-04 17:14:19 +0200
commit3d2abdfdf14f4d6decc2023708211e19b096f4ca (patch)
tree053b75c9bb096979bb06c104d35ab9811a690abf /net
parentmac80211: fix DS to MBSS address translation (diff)
downloadlinux-3d2abdfdf14f4d6decc2023708211e19b096f4ca.tar.xz
linux-3d2abdfdf14f4d6decc2023708211e19b096f4ca.zip
mac80211: clear bssid on auth/assoc failure
ifmgd->bssid wasn't cleared properly in some auth/assoc failure cases, causing mac80211 and the low-level driver to go out of sync. Clear ifmgd->bssid on failure, and notify the driver. Cc: stable@kernel.org # 3.4+ Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/mlme.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index a4a5acdbaa4d..f76b83341cf9 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3248,6 +3248,8 @@ int ieee80211_mgd_auth(struct ieee80211_sub_if_data *sdata,
goto out_unlock;
err_clear:
+ memset(ifmgd->bssid, 0, ETH_ALEN);
+ ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
ifmgd->auth_data = NULL;
err_free:
kfree(auth_data);
@@ -3439,6 +3441,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata,
err = 0;
goto out;
err_clear:
+ memset(ifmgd->bssid, 0, ETH_ALEN);
+ ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID);
ifmgd->assoc_data = NULL;
err_free:
kfree(assoc_data);