Commit 344b54b9 authored by Nick Kossifidis's avatar Nick Kossifidis Committed by John W. Linville

ath5k: Disable ANI during reset

 * Stop ANI durring reset to prevent false PHY error reports
Signed-off-by: default avatarNick Kossifidis <mickflemm@gmail.com>
Tested-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 19252ecb
...@@ -2653,7 +2653,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, ...@@ -2653,7 +2653,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
bool skip_pcu) bool skip_pcu)
{ {
struct ath5k_hw *ah = sc->ah; struct ath5k_hw *ah = sc->ah;
int ret; int ret, ani_mode;
ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n"); ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
...@@ -2661,6 +2661,12 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, ...@@ -2661,6 +2661,12 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
synchronize_irq(sc->irq); synchronize_irq(sc->irq);
stop_tasklets(sc); stop_tasklets(sc);
/* Save ani mode and disable ANI durring
* reset. If we don't we might get false
* PHY error interrupts. */
ani_mode = ah->ah_sc->ani_state.ani_mode;
ath5k_ani_init(ah, ATH5K_ANI_MODE_OFF);
/* We are going to empty hw queues /* We are going to empty hw queues
* so we should also free any remaining * so we should also free any remaining
* tx buffers */ * tx buffers */
...@@ -2682,7 +2688,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan, ...@@ -2682,7 +2688,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
goto err; goto err;
} }
ath5k_ani_init(ah, ah->ah_sc->ani_state.ani_mode); ath5k_ani_init(ah, ani_mode);
ah->ah_cal_next_full = jiffies; ah->ah_cal_next_full = jiffies;
ah->ah_cal_next_ani = jiffies; ah->ah_cal_next_ani = jiffies;
......
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