aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-12-23 20:03:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-28 16:20:00 -0500
commit3867cf6a8c699846e928e8f5a9f31013708df192 (patch)
tree10cd7cc2f289e8a5de30edcb26cc56a6d6484708 /drivers/net/wireless/ath/ath9k/main.c
parent65486c8b30498dd274eea2c542696f22b63fe5b8 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 9e68c1a8aef0..2ec7451350f0 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2514,6 +2514,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
2514 return; /* another wiphy still in use */ 2514 return; /* another wiphy still in use */
2515 } 2515 }
2516 2516
2517 /* Ensure HW is awake when we try to shut it down. */
2518 ath9k_ps_wakeup(sc);
2519
2517 if (ah->btcoex_hw.enabled) { 2520 if (ah->btcoex_hw.enabled) {
2518 ath9k_hw_btcoex_disable(ah); 2521 ath9k_hw_btcoex_disable(ah);
2519 if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) 2522 if (ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE)
@@ -2534,6 +2537,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
2534 /* disable HAL and put h/w to sleep */ 2537 /* disable HAL and put h/w to sleep */
2535 ath9k_hw_disable(ah); 2538 ath9k_hw_disable(ah);
2536 ath9k_hw_configpcipowersave(ah, 1, 1); 2539 ath9k_hw_configpcipowersave(ah, 1, 1);
2540 ath9k_ps_restore(sc);
2541
2542 /* Finally, put the chip in FULL SLEEP mode */
2537 ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP); 2543 ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP);
2538 2544
2539 sc->sc_flags |= SC_OP_INVALID; 2545 sc->sc_flags |= SC_OP_INVALID;