Skip to contentSkip to conversation

ath5k: Disable ANI during reset

PATCH In review Nick Kossifidis 2 participants 2 messages Dec 3, 2010 Atheros ATH5K wireless driver

lore
Share & tools
lore

Nick Kossifidis

author maintainer
#0 lore raw

PATCH 3/6 ath5k: Disable ANI during reset

* Stop ANI durring reset to prevent false PHY error reports

---
 drivers/net/wireless/ath/ath5k/base.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +8 -2
index 047b2a0..6edfa9f 100644
@@ -2504,7 +2504,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
 							bool skip_pcu)
 {
 	struct ath5k_hw *ah = sc->ah;
-	int ret;
+	int ret, ani_mode;
 
 	ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
 
@@ -2512,6 +2512,12 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
 	synchronize_irq(sc->pdev->irq);
 	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
 	 * so we should also free any remaining
 	 * tx buffers */
@@ -2533,7 +2539,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
 		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_ani = jiffies;
Tested-by on v1 3/6
#1 lore raw
Quoted 44 lines · Nick Kossifidis

 * Stop ANI durring reset to prevent false PHY error reports

---
 drivers/net/wireless/ath/ath5k/base.c |   10 ++++++++--

 1 files changed, 8 insertions(+), 2 deletions(-)
drivers/net/wireless/ath/ath5k/base.c +8 -2
index 047b2a0..6edfa9f 100644
@@ -2504,7 +2504,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
                                                        bool skip_pcu)
  {
        struct ath5k_hw *ah = sc->ah;
-       int ret;
+       int ret, ani_mode;
 
        ATH5K_DBG(sc, ATH5K_DEBUG_RESET, "resetting\n");
 
@@ -2512,6 +2512,12 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
        synchronize_irq(sc->pdev->irq);
        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
         * so we should also free any remaining
         * tx buffers */
@@ -2533,7 +2539,7 @@ ath5k_reset(struct ath5k_softc *sc, struct ieee80211_channel *chan,
                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_ani = jiffies;