diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-14 11:01:54 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-14 11:01:54 +0000 |
commit | 363255f86a78850699f936635569d8b2963248e7 (patch) | |
tree | cef4823c4cc4ff1101dfab0e5f5a1f257dd9d80d /package/mac80211 | |
parent | cbf4bc92c6a44cdc27ec4052ff1eced445cc4d2b (diff) |
mac80211: fix client mode state handling issues
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36632 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-rw-r--r-- | package/mac80211/patches/300-pending_work.patch | 62 |
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 5d946ca10..fd7417b44 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) |