aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-11-14 21:21:24 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-11-14 21:21:24 +0000
commit73c7e70a0b9879ef65e1b2eb01fcf582513f85a4 (patch)
tree218d35956e28f15592fa8536d796718a9e304b0a /package
parent5d835b8c1a9ba4c11acb80aecacc64069d2f107c (diff)
downloadmaster-187ad058-73c7e70a0b9879ef65e1b2eb01fcf582513f85a4.tar.gz
master-187ad058-73c7e70a0b9879ef65e1b2eb01fcf582513f85a4.tar.bz2
master-187ad058-73c7e70a0b9879ef65e1b2eb01fcf582513f85a4.zip
ath9k: do not put the hardware to full-sleep while tx is pending
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@29133 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/563-ath9k_fix_full_sleep_tx.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/package/mac80211/patches/563-ath9k_fix_full_sleep_tx.patch b/package/mac80211/patches/563-ath9k_fix_full_sleep_tx.patch
new file mode 100644
index 0000000000..17575b9e47
--- /dev/null
+++ b/package/mac80211/patches/563-ath9k_fix_full_sleep_tx.patch
@@ -0,0 +1,22 @@
+--- a/drivers/net/wireless/ath/ath9k/main.c
++++ b/drivers/net/wireless/ath/ath9k/main.c
+@@ -118,7 +118,7 @@ void ath9k_ps_restore(struct ath_softc *
+ if (--sc->ps_usecount != 0)
+ goto unlock;
+
+- if (sc->ps_idle)
++ if (sc->ps_idle && !(sc->ps_flags & PS_WAIT_FOR_TX_ACK))
+ mode = ATH9K_PM_FULL_SLEEP;
+ else if (sc->ps_enabled &&
+ !(sc->ps_flags & (PS_WAIT_FOR_BEACON |
+--- a/drivers/net/wireless/ath/ath9k/xmit.c
++++ b/drivers/net/wireless/ath/ath9k/xmit.c
+@@ -1983,7 +1983,7 @@ static void ath_tx_complete(struct ath_s
+ skb_pull(skb, padsize);
+ }
+
+- if (sc->ps_flags & PS_WAIT_FOR_TX_ACK) {
++ if ((sc->ps_flags & PS_WAIT_FOR_TX_ACK) && !txq->axq_depth) {
+ sc->ps_flags &= ~PS_WAIT_FOR_TX_ACK;
+ ath_dbg(common, ATH_DBG_PS,
+ "Going back to sleep after having received TX status (0x%lx)\n",