Commit 8782b41d authored by Vivek Natarajan's avatar Vivek Natarajan Committed by John W. Linville

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: default avatarVivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 616de35d
...@@ -2325,26 +2325,33 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed) ...@@ -2325,26 +2325,33 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
struct ath_wiphy *aphy = hw->priv; struct ath_wiphy *aphy = hw->priv;
struct ath_softc *sc = aphy->sc; struct ath_softc *sc = aphy->sc;
struct ieee80211_conf *conf = &hw->conf; struct ieee80211_conf *conf = &hw->conf;
struct ath_hw *ah = sc->sc_ah;
mutex_lock(&sc->mutex); mutex_lock(&sc->mutex);
if (changed & IEEE80211_CONF_CHANGE_PS) { if (changed & IEEE80211_CONF_CHANGE_PS) {
if (conf->flags & IEEE80211_CONF_PS) { if (conf->flags & IEEE80211_CONF_PS) {
if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) { if (!(ah->caps.hw_caps &
sc->imask |= ATH9K_INT_TIM_TIMER; ATH9K_HW_CAP_AUTOSLEEP)) {
ath9k_hw_set_interrupts(sc->sc_ah, if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
sc->imask); sc->imask |= ATH9K_INT_TIM_TIMER;
ath9k_hw_set_interrupts(sc->sc_ah,
sc->imask);
}
ath9k_hw_setrxabort(sc->sc_ah, 1);
} }
ath9k_hw_setrxabort(sc->sc_ah, 1);
ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP); ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_NETWORK_SLEEP);
} else { } else {
ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE); ath9k_hw_setpower(sc->sc_ah, ATH9K_PM_AWAKE);
ath9k_hw_setrxabort(sc->sc_ah, 0); if (!(ah->caps.hw_caps &
sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON; ATH9K_HW_CAP_AUTOSLEEP)) {
if (sc->imask & ATH9K_INT_TIM_TIMER) { ath9k_hw_setrxabort(sc->sc_ah, 0);
sc->imask &= ~ATH9K_INT_TIM_TIMER; sc->sc_flags &= ~SC_OP_WAIT_FOR_BEACON;
ath9k_hw_set_interrupts(sc->sc_ah, if (sc->imask & ATH9K_INT_TIM_TIMER) {
sc->imask); sc->imask &= ~ATH9K_INT_TIM_TIMER;
ath9k_hw_set_interrupts(sc->sc_ah,
sc->imask);
}
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment