aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanoharan@atheros.com>2011-01-31 13:17:46 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-03 16:44:43 -0500
commit4c89fe954d929781126af41691fba1bc670293a5 (patch)
tree7ce2e88e15890b5ca7005561a842b16c5434ddcd
parentb2a5c3dfecf3d0e1db08ac7cd94ee4c1cf9bc998 (diff)
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 <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 09eb0265b312..c9925e943bc0 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,
1354 1354
1355 ath9k_calculate_iter_data(hw, vif, &iter_data); 1355 ath9k_calculate_iter_data(hw, vif, &iter_data);
1356 1356
1357 ath9k_ps_wakeup(sc);
1357 /* Set BSSID mask. */ 1358 /* Set BSSID mask. */
1358 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN); 1359 memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
1359 ath_hw_setbssidmask(common); 1360 ath_hw_setbssidmask(common);
@@ -1388,6 +1389,7 @@ static void ath9k_calculate_summary_state(struct ieee80211_hw *hw,
1388 } 1389 }
1389 1390
1390 ath9k_hw_set_interrupts(ah, ah->imask); 1391 ath9k_hw_set_interrupts(ah, ah->imask);
1392 ath9k_ps_restore(sc);
1391 1393
1392 /* Set up ANI */ 1394 /* Set up ANI */
1393 if ((iter_data.naps + iter_data.nadhocs) > 0) { 1395 if ((iter_data.naps + iter_data.nadhocs) > 0) {