Skip to content

Commit 344b54b

Browse files
mickflemmlinvjw
authored andcommitted
ath5k: Disable ANI during reset
* Stop ANI durring reset to prevent false PHY error reports Signed-off-by: Nick Kossifidis <[email protected]> Tested-by: Sedat Dilek <[email protected]> Signed-off-by: John W. Linville <[email protected]>
1 parent 19252ec commit 344b54b

File tree

1 file changed

+8
-2
lines changed
  • drivers/net/wireless/ath/ath5k

1 file changed

+8
-2
lines changed

drivers/net/wireless/ath/ath5k/base.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,14 +2653,20 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
26532653
bool skip_pcu)
26542654
{
26552655
struct ath5k_hw *ah = sc->ah;
2656-
int ret;
2656+
int ret, ani_mode;
26572657

26582658
ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
26592659

26602660
ath5k_hw_set_imr(ah, 0);
26612661
synchronize_irq(sc->irq);
26622662
stop_tasklets(sc);
26632663

2664+
/* Save ani mode and disable ANI durring
2665+
* reset. If we don't we might get false
2666+
* PHY error interrupts. */
2667+
ani_mode = ah->ah_sc->ani_state.ani_mode;
2668+
ath5k_ani_init(ah, ATH5K_ANI_MODE_OFF);
2669+
26642670
/* We are going to empty hw queues
26652671
* so we should also free any remaining
26662672
* tx buffers */
@@ -2682,7 +2688,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
26822688
goto err;
26832689
}
26842690

2685-
ath5k_ani_init(ah, ah->ah_sc->ani_state.ani_mode);
2691+
ath5k_ani_init(ah, ani_mode);
26862692

26872693
ah->ah_cal_next_full = jiffies;
26882694
ah->ah_cal_next_ani = jiffies;

0 commit comments

Comments
 (0)