aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1c0d8fce08dd..637b22411d41 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2158,14 +2158,16 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
2158 struct ieee80211_local *local = sdata->local; 2158 struct ieee80211_local *local = sdata->local;
2159 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 2159 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
2160 struct ieee80211_work *wk; 2160 struct ieee80211_work *wk;
2161 const u8 *bssid = req->bss->bssid; 2161 u8 bssid[ETH_ALEN];
2162 bool assoc_bss = false;
2162 2163
2163 mutex_lock(&ifmgd->mtx); 2164 mutex_lock(&ifmgd->mtx);
2164 2165
2166 memcpy(bssid, req->bss->bssid, ETH_ALEN);
2165 if (ifmgd->associated == req->bss) { 2167 if (ifmgd->associated == req->bss) {
2166 bssid = req->bss->bssid; 2168 ieee80211_set_disassoc(sdata, false);
2167 ieee80211_set_disassoc(sdata, true);
2168 mutex_unlock(&ifmgd->mtx); 2169 mutex_unlock(&ifmgd->mtx);
2170 assoc_bss = true;
2169 } else { 2171 } else {
2170 bool not_auth_yet = false; 2172 bool not_auth_yet = false;
2171 2173
@@ -2211,6 +2213,8 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
2211 ieee80211_send_deauth_disassoc(sdata, bssid, IEEE80211_STYPE_DEAUTH, 2213 ieee80211_send_deauth_disassoc(sdata, bssid, IEEE80211_STYPE_DEAUTH,
2212 req->reason_code, cookie, 2214 req->reason_code, cookie,
2213 !req->local_state_change); 2215 !req->local_state_change);
2216 if (assoc_bss)
2217 sta_info_destroy_addr(sdata, bssid);
2214 2218
2215 ieee80211_recalc_idle(sdata->local); 2219 ieee80211_recalc_idle(sdata->local);
2216 2220