ath9k: disable hardware full sleep with active client mode interface until mac80211...
authorFelix Fietkau <nbd@openwrt.org>
Tue, 10 Jul 2012 23:42:30 +0000 (23:42 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 10 Jul 2012 23:42:30 +0000 (23:42 +0000)
SVN-Revision: 32657

package/mac80211/patches/567-ath9k_add_idle_hack.patch [new file with mode: 0644]

diff --git a/package/mac80211/patches/567-ath9k_add_idle_hack.patch b/package/mac80211/patches/567-ath9k_add_idle_hack.patch
new file mode 100644 (file)
index 0000000..9f1a43d
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -1044,6 +1044,7 @@ static void ath9k_remove_interface(struc
+       ath9k_calculate_summary_state(hw, NULL);
+       mutex_unlock(&sc->mutex);
++      ath9k_config(hw, IEEE80211_CONF_CHANGE_IDLE);
+       ath9k_ps_restore(sc);
+ }
+@@ -1096,7 +1097,8 @@ int ath9k_config(struct ieee80211_hw *hw
+       mutex_lock(&sc->mutex);
+       if (changed & IEEE80211_CONF_CHANGE_IDLE) {
+-              sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
++              sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE) &&
++                            !sc->nvifs;
+               if (sc->ps_idle) {
+                       ath_cancel_work(sc);
+                       ath9k_stop_btcoex(sc);