diff options
author | sam <sam@FreeBSD.org> | 2009-01-23 03:15:28 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2009-01-23 03:15:28 +0000 |
commit | 17495425fef0ada3bc012d653130e7b0d515739c (patch) | |
tree | ec25eea4cae1f6f1ceb063a884245b7d00f6ffdb /sys/dev/ath | |
parent | 9e3e63a72b0b61f12b8db723909ce670b6cbba73 (diff) | |
download | FreeBSD-src-17495425fef0ada3bc012d653130e7b0d515739c.zip FreeBSD-src-17495425fef0ada3bc012d653130e7b0d515739c.tar.gz |
don't run the calibration code if scanning, we won't be on the home channel
Diffstat (limited to 'sys/dev/ath')
-rw-r--r-- | sys/dev/ath/if_ath.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c index 2876e0e..c194ecd 100644 --- a/sys/dev/ath/if_ath.c +++ b/sys/dev/ath/if_ath.c @@ -5793,9 +5793,12 @@ ath_calibrate(void *arg) struct ath_softc *sc = arg; struct ath_hal *ah = sc->sc_ah; struct ifnet *ifp = sc->sc_ifp; + struct ieee80211com *ic = ifp->if_l2com; HAL_BOOL longCal, isCalDone; int nextcal; + if (ic->ic_flags & IEEE80211_F_SCAN) /* defer, off channel */ + goto restart; longCal = (ticks - sc->sc_lastlongcal >= ath_longcalinterval*hz); if (longCal) { sc->sc_stats.ast_per_cal++; @@ -5833,6 +5836,7 @@ ath_calibrate(void *arg) sc->sc_stats.ast_per_calfail++; } if (!isCalDone) { +restart: /* * Use a shorter interval to potentially collect multiple * data samples required to complete calibration. Once |