From: Rajkumar Manoharan Date: Thu, 15 Sep 2011 13:32:54 +0000 (+0530) Subject: ath9k: Reset caldata on radio enable X-Git-Tag: MMI-PSA29.97-13-9~18194^2~183^2~103 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2c71c20789189cd01978efcbdd61231f5929eaf;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ath9k: Reset caldata on radio enable 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 7910165cf0e6..6dcd8def5530 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c @@ -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)); } }