ath9k: Reset caldata on radio enable
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Thu, 15 Sep 2011 13:32:54 +0000 (19:02 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 19 Sep 2011 19:58:25 +0000 (15:58 -0400)
Not doing so, the caldata continues to retain older history
values learned on that channel. It is always safer to start
noise floor calibration from the defaults after the assoication.
So this patch resets the nf history buffer when none of the
STA vifs are associated.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/main.c

index 7910165cf0e6874238582fdca6b13643a7112c67..6dcd8def55301d4f0365e4536976abdef52cb9d2 100644 (file)
@@ -2021,6 +2021,7 @@ static void ath9k_config_bss(struct ath_softc *sc, struct ieee80211_vif *vif)
                /* Stop ANI */
                sc->sc_flags &= ~SC_OP_ANI_RUN;
                del_timer_sync(&common->ani.timer);
+               memset(&sc->caldata, 0, sizeof(sc->caldata));
        }
 }