aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index e6e52f48e718..431854ccb65b 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -478,6 +478,8 @@ static struct ath_hw *ath9k_hw_newstate(u16 devid, struct ath_softc *sc,
478 478
479 ah->gbeacon_rate = 0; 479 ah->gbeacon_rate = 0;
480 480
481 ah->power_mode = ATH9K_PM_UNDEFINED;
482
481 return ah; 483 return ah;
482} 484}
483 485
@@ -2819,6 +2821,9 @@ static bool ath9k_hw_setpower_nolock(struct ath_hw *ah,
2819 "UNDEFINED" 2821 "UNDEFINED"
2820 }; 2822 };
2821 2823
2824 if (ah->power_mode == mode)
2825 return status;
2826
2822 DPRINTF(ah->ah_sc, ATH_DBG_RESET, "%s -> %s\n", 2827 DPRINTF(ah->ah_sc, ATH_DBG_RESET, "%s -> %s\n",
2823 modes[ah->power_mode], modes[mode]); 2828 modes[ah->power_mode], modes[mode]);
2824 2829
@@ -2863,8 +2868,7 @@ void ath9k_ps_wakeup(struct ath_softc *sc)
2863 if (++sc->ps_usecount != 1) 2868 if (++sc->ps_usecount != 1)
2864 goto unlock; 2869 goto unlock;
2865 2870
2866 if (sc->sc_ah->power_mode != ATH9K_PM_AWAKE) 2871 ath9k_hw_setpower_nolock(sc->sc_ah, ATH9K_PM_AWAKE);
2867 ath9k_hw_setpower_nolock(sc->sc_ah, ATH9K_PM_AWAKE);
2868 2872
2869 unlock: 2873 unlock:
2870 spin_unlock_irqrestore(&sc->sc_pm_lock, flags); 2874 spin_unlock_irqrestore(&sc->sc_pm_lock, flags);