summaryrefslogtreecommitdiffstats
path: root/net/mac80211/mlme.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2015-10-25 04:59:38 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-11-03 04:41:00 -0500
commita64cba3c5330704a034bd3179270b8d04daf6987 (patch)
tree2c9f387dc668a9bb94523bf3b6911f1068fa7290 /net/mac80211/mlme.c
parent254d3dfe445f94a764e399ca12e04365ac9413ed (diff)
mac80211: Fix local deauth while associating
Local request to deauthenticate wasn't handled while associating, thus the association could continue even when the user space required to disconnect. Cc: stable@vger.kernel.org Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r--net/mac80211/mlme.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index ded4b976bb48..73f1a2a0df5a 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4936,6 +4936,25 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
4936 return 0; 4936 return 0;
4937 } 4937 }
4938 4938
4939 if (ifmgd->assoc_data &&
4940 ether_addr_equal(ifmgd->assoc_data->bss->bssid, req->bssid)) {
4941 sdata_info(sdata,
4942 "aborting association with %pM by local choice (Reason: %u=%s)\n",
4943 req->bssid, req->reason_code,
4944 ieee80211_get_reason_code_string(req->reason_code));
4945
4946 drv_mgd_prepare_tx(sdata->local, sdata);
4947 ieee80211_send_deauth_disassoc(sdata, req->bssid,
4948 IEEE80211_STYPE_DEAUTH,
4949 req->reason_code, tx,
4950 frame_buf);
4951 ieee80211_destroy_assoc_data(sdata, false);
4952 ieee80211_report_disconnect(sdata, frame_buf,
4953 sizeof(frame_buf), true,
4954 req->reason_code);
4955 return 0;
4956 }
4957
4939 if (ifmgd->associated && 4958 if (ifmgd->associated &&
4940 ether_addr_equal(ifmgd->associated->bssid, req->bssid)) { 4959 ether_addr_equal(ifmgd->associated->bssid, req->bssid)) {
4941 sdata_info(sdata, 4960 sdata_info(sdata,