]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ath9k: do not access hw registers in FULL SLEEP
authorRajkumar Manoharan <rmanoharan@atheros.com>
Mon, 31 Jan 2011 18:17:46 +0000 (23:47 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 3 Feb 2011 21:44:43 +0000 (16:44 -0500)
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>
drivers/net/wireless/ath/ath9k/main.c

index 09eb0265b312e57bfa3a03c0068f1c2ab93084fa..c9925e943bc0d7be281f7556e4a18588f15e1f45 100644 (file)
@@ -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) {