From 4c89fe954d929781126af41691fba1bc670293a5 Mon Sep 17 00:00:00 2001 From: Rajkumar Manoharan Date: Mon, 31 Jan 2011 23:47:46 +0530 Subject: [PATCH] ath9k: do not access hw registers in FULL SLEEP The opmode recalculation is accessing hw registers. When it is called from remove interface callback and if there are no vifs present then hw is moved to FULL SLEEP by radio disable. So use power save wrappers before accessing hw registers in calculating opmode state. Signed-off-by: Rajkumar Manoharan Signed-off-by: John W. Linville --- drivers/net/wireless/ath/ath9k/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 09eb0265b31..c9925e943bc 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -1354,6 +1354,7 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, ath9k_calculate_iter_data(hw, vif, &iter_data); + ath9k_ps_wakeup(sc); /* Set BSSID mask. */ memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); ath_hw_setbssidmask(common); @@ -1388,6 +1389,7 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw, } ath9k_hw_set_interrupts(ah, ah->imask); + ath9k_ps_restore(sc); /* Set up ANI */ if ((iter_data.naps + iter_data.nadhocs) > 0) { -- 2.46.0