aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVivek Natarajan <vivek.natraj@gmail.com>2009-03-30 04:47:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-04-22 16:54:29 -0400
commit8782b41d13c8e5f9a201477d3c15edf9fe7c372c (patch)
tree1f1588ee8053776ca7688e41448131288733c135
parent616de35da94df8748771a014ef898360d5f4d0c8 (diff)
ath9k: No need to abort Rx path when autosleep is enabled.
For chipsets supporting autosleep feature, there is no need to abort Rx engine since they are capable of automatically going back to sleep after receiving a packet. Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath9k/main.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index 0607df20e49..97cf83fa855 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -2325,26 +2325,33 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
2325 struct ath_wiphy *aphy = hw->priv; 2325 struct ath_wiphy *aphy = hw->priv;
2326 struct ath_softc *sc = aphy->sc; 2326 struct ath_softc *sc = aphy->sc;
2327 struct ieee80211_conf *conf = &hw->conf; 2327 struct ieee80211_conf *conf = &hw->conf;
2328 struct ath_hw *ah = sc->sc_ah;
2328 2329
2329 mutex_lock(&sc->mutex); 2330 mutex_lock(&sc->mutex);
2330 2331
2331 if (changed & IEEE80211_CONF_CHANGE_PS) { 2332 if (changed & IEEE80211_CONF_CHANGE_PS) {
2332 if (conf->flags & IEEE80211_CONF_PS) { 2333 if (conf->flags & IEEE80211_CONF_PS) {
2333 if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) { 2334 if (!(ah->caps.hw_caps &
2334 sc->imask |= ATH9K_INT_TIM_TIMER; 2335 ATH9K_HW_CAP_AUTOSLEEP)) {
2335 ath9k_hw_set_interrupts(sc->sc_ah, 2336 if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
2336 sc->imask); 2337 sc->imask |= ATH9K_INT_TIM_TIMER;
2338 ath9k_hw_set_interrupts(sc->sc_ah,
2339 sc->imask);
2340 }
2341 ath9k_hw_setrxabort(sc->sc_ah, 1);
2337 } 2342 }
2338 ath9k_hw_setrxabort(sc->sc_ah, 1);
2339 ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP); 2343 ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP);
2340 } else { 2344 } else {
2341 ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); 2345 ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
2342 ath9k_hw_setrxabort(sc->sc_ah, 0); 2346 if (!(ah->caps.hw_caps &
2343 sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON; 2347 ATH9K_HW_CAP_AUTOSLEEP)) {
2344 if (sc->imask & ATH9K_INT_TIM_TIMER) { 2348 ath9k_hw_setrxabort(sc->sc_ah, 0);
2345 sc->imask &= ~ATH9K_INT_TIM_TIMER; 2349 sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON;
2346 ath9k_hw_set_interrupts(sc->sc_ah, 2350 if (sc->imask & ATH9K_INT_TIM_TIMER) {
2347 sc->imask); 2351 sc->imask &= ~ATH9K_INT_TIM_TIMER;
2352 ath9k_hw_set_interrupts(sc->sc_ah,
2353 sc->imask);
2354 }
2348 } 2355 }
2349 } 2356 }
2350 } 2357 }