ath9k: fix suspend by waking device prior to stop
Ensure the device is awake prior to trying to tell hardware to stop it. Impact of not doing this is we can likely leave the device in an undefined state likely causing issues with suspend and resume. This patch ensures harware is where it should be prior to suspend. Cc: stable@kernel.org Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
65486c8b30
commit
3867cf6a8c
1 changed files with 6 additions and 0 deletions
|
@ -2514,6 +2514,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
|
|||
return; /* another wiphy still in use */
|
||||
}
|
||||
|
||||
/* Ensure HW is awake when we try to shut it down. */
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
if (ah->btcoex_hw.enabled) {
|
||||
ath9k_hw_btcoex_disable(ah);
|
||||
if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
|
||||
|
@ -2534,6 +2537,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
|
|||
/* disable HAL and put h/w to sleep */
|
||||
ath9k_hw_disable(ah);
|
||||
ath9k_hw_configpcipowersave(ah, 1, 1);
|
||||
ath9k_ps_restore(sc);
|
||||
|
||||
/* Finally, put the chip in FULL SLEEP mode */
|
||||
ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);
|
||||
|
||||
sc->sc_flags |= SC_OP_INVALID;
|
||||
|
|
Loading…
Reference in a new issue