lkml.org 
[lkml]   [2012]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[ 049/175] ath9k: fix going to full-sleep on PS idle
    3.3-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Felix Fietkau <nbd@openwrt.org>

    commit c1afdaff90538ef085b756454f12b29575411214 upstream.

    The check for PS_WAIT_FOR_TX_ACK was inverted, the hardware should only go
    to full sleep if no tx is pending.

    Reported-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
    Signed-off-by: John W. Linville <linville@tuxdriver.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/net/wireless/ath/ath9k/main.c | 8 +++++---
    1 file changed, 5 insertions(+), 3 deletions(-)

    --- a/drivers/net/wireless/ath/ath9k/main.c
    +++ b/drivers/net/wireless/ath/ath9k/main.c
    @@ -118,13 +118,15 @@ void ath9k_ps_restore(struct ath_softc *
    if (--sc->ps_usecount != 0)
    goto unlock;

    - if (sc->ps_idle && (sc->ps_flags & PS_WAIT_FOR_TX_ACK))
    + if (sc->ps_flags & PS_WAIT_FOR_TX_ACK)
    + goto unlock;
    +
    + if (sc->ps_idle)
    mode = ATH9K_PM_FULL_SLEEP;
    else if (sc->ps_enabled &&
    !(sc->ps_flags & (PS_WAIT_FOR_BEACON |
    PS_WAIT_FOR_CAB |
    - PS_WAIT_FOR_PSPOLL_DATA |
    - PS_WAIT_FOR_TX_ACK)))
    + PS_WAIT_FOR_PSPOLL_DATA)))
    mode = ATH9K_PM_NETWORK_SLEEP;
    else
    goto unlock;



    \
     
     \ /
      Last update: 2012-03-30 23:23    [W:5.468 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site