summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-05-14 11:01:54 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-05-14 11:01:54 +0000
commitc27351f2fab86e52286da3bb2e965a9bbb9909d6 (patch)
treef98d162e5fa242f60371dea553624c076f301f00 /package
parent144cfb65a478a57ae0c551df27ee6d152b644799 (diff)
downloadmtk-20170518-c27351f2fab86e52286da3bb2e965a9bbb9909d6.zip
mtk-20170518-c27351f2fab86e52286da3bb2e965a9bbb9909d6.tar.gz
mtk-20170518-c27351f2fab86e52286da3bb2e965a9bbb9909d6.tar.bz2
mac80211: fix client mode state handling issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 36632
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/300-pending_work.patch62
1 files changed, 62 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 5d946ca..fd7417b 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -1921,6 +1921,39 @@
}
mutex_unlock(&ifmgd->mtx);
+@@ -4197,7 +4344,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
+ bool tx = !req->local_state_change;
+- bool sent_frame = false;
++ bool report_frame = false;
+
+ mutex_lock(&ifmgd->mtx);
+
+@@ -4214,7 +4361,7 @@ int ieee80211_mgd_deauth(struct ieee8021
+ ieee80211_destroy_auth_data(sdata, false);
+ mutex_unlock(&ifmgd->mtx);
+
+- sent_frame = tx;
++ report_frame = true;
+ goto out;
+ }
+
+@@ -4222,12 +4369,12 @@ int ieee80211_mgd_deauth(struct ieee8021
+ ether_addr_equal(ifmgd->associated->bssid, req->bssid)) {
+ ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
+ req->reason_code, tx, frame_buf);
+- sent_frame = tx;
++ report_frame = true;
+ }
+ mutex_unlock(&ifmgd->mtx);
+
+ out:
+- if (sent_frame)
++ if (report_frame)
+ __cfg80211_send_deauth(sdata->dev, frame_buf,
+ IEEE80211_DEAUTH_FRAME_LEN);
+
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -38,8 +38,8 @@ int __ieee80211_suspend(struct ieee80211
@@ -3836,3 +3869,32 @@
skb_put(skb, rs.rs_datalen + ah->caps.rx_status_len);
if (ah->caps.rx_status_len)
skb_pull(skb, ah->caps.rx_status_len);
+--- a/net/wireless/core.c
++++ b/net/wireless/core.c
+@@ -885,7 +885,6 @@ void cfg80211_leave(struct cfg80211_regi
+ #endif
+ __cfg80211_disconnect(rdev, dev,
+ WLAN_REASON_DEAUTH_LEAVING, true);
+- cfg80211_mlme_down(rdev, dev);
+ wdev_unlock(wdev);
+ break;
+ case NL80211_IFTYPE_MESH_POINT:
+--- a/net/wireless/sme.c
++++ b/net/wireless/sme.c
+@@ -961,7 +961,7 @@ int __cfg80211_disconnect(struct cfg8021
+ /* was it connected by userspace SME? */
+ if (!wdev->conn) {
+ cfg80211_mlme_down(rdev, dev);
+- return 0;
++ goto disconnect;
+ }
+
+ if (wdev->sme_state == CFG80211_SME_CONNECTING &&
+@@ -987,6 +987,7 @@ int __cfg80211_disconnect(struct cfg8021
+ return err;
+ }
+
++ disconnect:
+ if (wdev->sme_state == CFG80211_SME_CONNECTED)
+ __cfg80211_disconnected(dev, NULL, 0, 0, false);
+ else if (wdev->sme_state == CFG80211_SME_CONNECTING)