aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-05-14 03:39:02 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-05-16 16:38:08 -0400
commitde3d43a37de9549356d1bc4a6a2a3f07ccbdf072 (patch)
tree498b0c645e9f8561edfb599f7866b7f052e9aa4f /net/mac80211/mlme.c
parent2430816b4e29fd9e6719ff46a4292d8f58565cff (diff)
mac80211: report deauth to cfg80211 for local state change
Even if the frame isn't transmitted to the AP, we need to report it to cfg80211 so the state there can be updated correctly. Reported-by: Jouni Malinen <j@w1.fi> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index d87d3f1a2f94..a46e490f20dd 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4370,7 +4370,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
4370 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; 4370 struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
4371 u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN]; 4371 u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
4372 bool tx = !req->local_state_change; 4372 bool tx = !req->local_state_change;
4373 bool sent_frame = false; 4373 bool report_frame = false;
4374 4374
4375 mutex_lock(&ifmgd->mtx); 4375 mutex_lock(&ifmgd->mtx);
4376 4376
@@ -4387,7 +4387,7 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
4387 ieee80211_destroy_auth_data(sdata, false); 4387 ieee80211_destroy_auth_data(sdata, false);
4388 mutex_unlock(&ifmgd->mtx); 4388 mutex_unlock(&ifmgd->mtx);
4389 4389
4390 sent_frame = tx; 4390 report_frame = true;
4391 goto out; 4391 goto out;
4392 } 4392 }
4393 4393
@@ -4395,12 +4395,12 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
4395 ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { 4395 ether_addr_equal(ifmgd->associated->bssid, req->bssid)) {
4396 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH, 4396 ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
4397 req->reason_code, tx, frame_buf); 4397 req->reason_code, tx, frame_buf);
4398 sent_frame = tx; 4398 report_frame = true;
4399 } 4399 }
4400 mutex_unlock(&ifmgd->mtx); 4400 mutex_unlock(&ifmgd->mtx);
4401 4401
4402 out: 4402 out:
4403 if (sent_frame) 4403 if (report_frame)
4404 __cfg80211_send_deauth(sdata->dev, frame_buf, 4404 __cfg80211_send_deauth(sdata->dev, frame_buf,
4405 IEEE80211_DEAUTH_FRAME_LEN); 4405 IEEE80211_DEAUTH_FRAME_LEN);
4406 4406