From: Felix Fietkau Date: Tue, 14 May 2013 11:01:54 +0000 (+0000) Subject: mac80211: fix client mode state handling issues X-Git-Tag: reboot~10441 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=c27351f2fab86e52286da3bb2e965a9bbb9909d6;p=openwrt%2Fstaging%2Fnoltari.git mac80211: fix client mode state handling issues Signed-off-by: Felix Fietkau SVN-Revision: 36632 --- diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch index 5d946ca102..fd7417b44b 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)