ath9k: fix a regression in ath9k_ps_restore
authorFelix Fietkau <nbd@openwrt.org>
Thu, 22 Sep 2011 14:04:32 +0000 (08:04 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 27 Sep 2011 18:34:05 +0000 (14:34 -0400)
After 'ath9k: optimize ath9k_ps_restore', it would only send the device to
network sleep and not to full sleep anymore, potentially causing more
battery drain.

Reported-by: Vivek Natarajan <nataraja@qca.qualcomm.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c

index fb803e2097605decf8dcc549a129e822d1aedc12..edaa7843bf4c7767f275e7ce1a7553f600cb7038 100644 (file)
@@ -133,7 +133,7 @@ void ath9k_ps_restore(struct ath_softc *sc)
        ath_hw_cycle_counters_update(common);
        spin_unlock(&common->cc_lock);
 
-       ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP);
+       ath9k_hw_setpower(sc->sc_ah, mode);
 
  unlock:
        spin_unlock_irqrestore(&sc->sc_pm_lock, flags);