PERFORCE change 152758 for review
Sam Leffler
sam at FreeBSD.org
Mon Nov 10 11:48:18 PST 2008
http://perforce.freebsd.org/chv.cgi?CH=152758
Change 152758 by sam at sam_ebb on 2008/11/10 19:47:39
allow setting the cal interval to 0 to disable periodic cals
for testing
Affected files ...
.. //depot/projects/vap/sys/dev/ath/if_ath.c#122 edit
Differences ...
==== //depot/projects/vap/sys/dev/ath/if_ath.c#122 (text+ko) ====
@@ -5582,15 +5582,22 @@
if (sc->sc_calinterval > ath_calinterval)
sc->sc_calinterval = ath_calinterval;
}
- KASSERT(0 < sc->sc_calinterval && sc->sc_calinterval <= ath_calinterval,
+ KASSERT(0 <= sc->sc_calinterval &&
+ sc->sc_calinterval <= ath_calinterval,
("bad calibration interval %u", sc->sc_calinterval));
- DPRINTF(sc, ATH_DEBUG_CALIBRATE,
- "%s: next +%u (%siqCalDone tries %u)\n", __func__,
- sc->sc_calinterval, iqCalDone ? "" : "!", sc->sc_caltries);
- sc->sc_caltries++;
- callout_reset(&sc->sc_cal_ch, sc->sc_calinterval * hz,
- ath_calibrate, sc);
+ if (ath_calinterval != 0) {
+ DPRINTF(sc, ATH_DEBUG_CALIBRATE,
+ "%s: next +%u (%siqCalDone tries %u)\n", __func__,
+ sc->sc_calinterval, iqCalDone ? "" : "!", sc->sc_caltries);
+ sc->sc_caltries++;
+ callout_reset(&sc->sc_cal_ch, sc->sc_calinterval * hz,
+ ath_calibrate, sc);
+ } else {
+ DPRINTF(sc, ATH_DEBUG_CALIBRATE, "%s: calibration disabled\n",
+ __func__);
+ /* NB: don't rearm timer */
+ }
}
static void
More information about the p4-projects
mailing list