diff options
author | Eliad Peller <eliad@wizery.com> | 2012-09-04 10:44:45 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-09-04 11:14:19 -0400 |
commit | 3d2abdfdf14f4d6decc2023708211e19b096f4ca (patch) | |
tree | 053b75c9bb096979bb06c104d35ab9811a690abf /net/mac80211 | |
parent | 27f011243a6e4e8b81078df1d83608dae31e3d38 (diff) |
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/mac80211')
-rw-r--r-- | net/mac80211/mlme.c | 4 |
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, | |||
3248 | goto out_unlock; | 3248 | goto out_unlock; |
3249 | 3249 | ||
3250 | err_clear: | 3250 | err_clear: |
3251 | memset(ifmgd->bssid, 0, ETH_ALEN); | ||
3252 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); | ||
3251 | ifmgd->auth_data = NULL; | 3253 | ifmgd->auth_data = NULL; |
3252 | err_free: | 3254 | err_free: |
3253 | kfree(auth_data); | 3255 | kfree(auth_data); |
@@ -3439,6 +3441,8 @@ int ieee80211_mgd_assoc(struct ieee80211_sub_if_data *sdata, | |||
3439 | err = 0; | 3441 | err = 0; |
3440 | goto out; | 3442 | goto out; |
3441 | err_clear: | 3443 | err_clear: |
3444 | memset(ifmgd->bssid, 0, ETH_ALEN); | ||
3445 | ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BSSID); | ||
3442 | ifmgd->assoc_data = NULL; | 3446 | ifmgd->assoc_data = NULL; |
3443 | err_free: | 3447 | err_free: |
3444 | kfree(assoc_data); | 3448 | kfree(assoc_data); |