瀏覽代碼

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>
Rajkumar Manoharan 14 年之前
父節點
當前提交
4c89fe954d
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/net/wireless/ath/ath9k/main.c

+ 2 - 0
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_calculate_iter_data(hw, vif, &iter_data);
 
 
+	ath9k_ps_wakeup(sc);
 	/* Set BSSID mask. */
 	/* Set BSSID mask. */
 	memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
 	memcpy(common->bssidmask, iter_data.mask, ETH_ALEN);
 	ath_hw_setbssidmask(common);
 	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_hw_set_interrupts(ah, ah->imask);
+	ath9k_ps_restore(sc);
 
 
 	/* Set up ANI */
 	/* Set up ANI */
 	if ((iter_data.naps + iter_data.nadhocs) > 0) {
 	if ((iter_data.naps + iter_data.nadhocs) > 0) {