aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211/patches/300-pending_work.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-17 18:54:05 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-10-17 18:54:05 +0000
commit5a0863162fb89d58f55f954208c1df4d3c15c276 (patch)
tree807cfbeb334e584f3862d2eeb82756d42511be0e /package/mac80211/patches/300-pending_work.patch
parentb68a1fd138099993283a45f787a35e5c68e69548 (diff)
downloadupstream-5a0863162fb89d58f55f954208c1df4d3c15c276.tar.gz
upstream-5a0863162fb89d58f55f954208c1df4d3c15c276.tar.bz2
upstream-5a0863162fb89d58f55f954208c1df4d3c15c276.zip
mac80211: merge a client mode state handling fix, refresh patches
Backport of r33821 git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@33822 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211/patches/300-pending_work.patch')
-rw-r--r--package/mac80211/patches/300-pending_work.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index f7a0aede53..9a4b24e4ea 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -510,6 +510,29 @@
ieee80211_bss_info_change_notify(sdata, changed);
}
+@@ -3526,6 +3572,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+ {
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ u8 frame_buf[DEAUTH_DISASSOC_LEN];
++ bool tx = !req->local_state_change;
+
+ mutex_lock(&ifmgd->mtx);
+
+@@ -3542,12 +3589,12 @@ int ieee80211_mgd_deauth(struct ieee8021
+ if (ifmgd->associated &&
+ ether_addr_equal(ifmgd->associated->bssid, req->bssid)) {
+ ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
+- req->reason_code, true, frame_buf);
++ req->reason_code, tx, frame_buf);
+ } else {
+ drv_mgd_prepare_tx(sdata->local, sdata);
+ ieee80211_send_deauth_disassoc(sdata, req->bssid,
+ IEEE80211_STYPE_DEAUTH,
+- req->reason_code, true,
++ req->reason_code, tx,
+ frame_buf);
+ }
+
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -674,7 +674,7 @@ int __must_check __sta_info_destroy(stru
@@ -590,3 +613,39 @@
if (local->user_power_level >= 0)
power = min(power, local->user_power_level);
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -1218,6 +1218,7 @@ struct cfg80211_deauth_request {
+ const u8 *ie;
+ size_t ie_len;
+ u16 reason_code;
++ bool local_state_change;
+ };
+
+ /**
+--- a/net/wireless/mlme.c
++++ b/net/wireless/mlme.c
+@@ -457,20 +457,14 @@ int __cfg80211_mlme_deauth(struct cfg802
+ .reason_code = reason,
+ .ie = ie,
+ .ie_len = ie_len,
++ .local_state_change = local_state_change,
+ };
+
+ ASSERT_WDEV_LOCK(wdev);
+
+- if (local_state_change) {
+- if (wdev->current_bss &&
+- ether_addr_equal(wdev->current_bss->pub.bssid, bssid)) {
+- cfg80211_unhold_bss(wdev->current_bss);
+- cfg80211_put_bss(&wdev->current_bss->pub);
+- wdev->current_bss = NULL;
+- }
+-
++ if (local_state_change && (!wdev->current_bss ||
++ !ether_addr_equal(wdev->current_bss->pub.bssid, bssid)))
+ return 0;
+- }
+
+ return rdev->ops->deauth(&rdev->wiphy, dev, &req);
+ }