aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2010-12-07 18:13:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-13 15:23:27 -0500
commita08e7ade9ddf4fe79576f953cc5c1725e944d26c (patch)
treefa0d6e814b4aa06ab416b090b74cf538f01be862 /drivers/net/wireless/ath/ath9k/main.c
parentc2731b814e2aaaa40072ee761b7373c052d86e37 (diff)
ath9k: fix assumptions for idle calls on suspend/resume
mac80211 will notify drivers when to go idle and ath9k assumed that it would get further notifications for idle states after a device stop() config call but as per agreed semantics the idle state of the radio is left up to driver after mac80211 issues the stop() callback. The driver is resposnbile for ensuring the device remains idle after that even between suspend / resume calls. This fixes suspend/resume when you issue suspend and resume twice on ath9k when ath9k_stop() was already called. We need to put the radio to full sleep in order for resume to work correctly. What might seem fishy is we are turning the radio off after resume. The reason why we do this is because we know we should not have anything enabled after a mac80211 tells us to stop(), if we resume and never get a start() we won't get another stop() by mac80211 so to be safe always bring the 802.11 device with the radio disabled after resume, this ensures that if we suspend we already have the radio disabled and only a start() will ever trigger it on. Cc: stable@kernel.org Cc: Paul Stewart <pstew@google.com> Cc: Amod Bodas <amod.bodas@atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index ef298f41ab4a..ef87637e4245 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1333,8 +1333,8 @@ static void ath9k_stop(struct ieee80211_hw *hw)
1333 1333
1334 ath9k_ps_restore(sc); 1334 ath9k_ps_restore(sc);
1335 1335
1336 /* Finally, put the chip in FULL SLEEP mode */ 1336 sc->ps_idle = true;
1337 ath9k_setpower(sc, ATH9K_PM_FULL_SLEEP); 1337 ath_radio_disable(sc, hw);
1338 1338
1339 sc->sc_flags |= SC_OP_INVALID; 1339 sc->sc_flags |= SC_OP_INVALID;
1340 1340