ath9k: fix regression which prevents chip sleep after CAB data
authorSenthil Balasubramanian <[email protected]>
Thu, 16 Sep 2010 19:12:35 +0000 (15:12 -0400)
committerJohn W. Linville <[email protected]>
Thu, 16 Sep 2010 19:46:19 +0000 (15:46 -0400)
The patch:

commit 293dc5dfdbcc16cde06e40a688394cc8ab083e48
Author: Gabor Juhos <[email protected]>
Date:   Fri Jun 19 12:17:48 2009 +0200

    ath9k: remove ath_rx_ps_back_to_sleep helper

    This helper only clears the SC_OP_WAIT_FOR_{BEACON,CAB} flags.
    Remove it and clear these flags directly in the approptiate
    places instead.

    Changes-licensed-under: ISC
Signed-off-by: Gabor Juhos <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
introduced a regression which forgot to lift the beacon flag
after we received all broadcast and multicast data. This meant
we never went to sleep consuming about ~650mW on idle. This pretty
much broke power save completely.

This patch has fixes for stable kernels [2.6.32+].

Cc: [email protected]
Cc: Paul Stewart <[email protected]>
Cc: Sameer Nanda <[email protected]>
Cc: Gabor Juhos <[email protected]>
Cc: Amod Bodas <[email protected]>
Signed-off-by: Senthil Balasubramanian <[email protected]>
Signed-off-by: Luis R. Rodriguez <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
drivers/net/wireless/ath/ath9k/recv.c

index 007df33ab05eb058100e69e686362a28f7f2e92d..c5e7af4f51abf05f40c76d1f3fba8a05aee38e20 100644 (file)
@@ -639,7 +639,7 @@ static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb)
                 * No more broadcast/multicast frames to be received at this
                 * point.
                 */
-               sc->ps_flags &= ~PS_WAIT_FOR_CAB;
+               sc->ps_flags &= ~(PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON);
                ath_print(common, ATH_DBG_PS,
                          "All PS CAB frames received, back to sleep\n");
        } else if ((sc->ps_flags & PS_WAIT_FOR_PSPOLL_DATA) &&