From 79e6fd00411e7efe7070141c9e5feda3ad3e4781 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Wed, 8 Sep 2010 22:43:37 -0700 Subject: [PATCH] wlan - Update ath, sync rev 1.276@FreeBSD * Don't delay updating the longcal timer - instead, update the longcal flag immediately so it's only set once per longcal interval. Without this, the current AR5416 code will continuously spam NF calibrations during a periodic calibration if the longcal flag is set. The longcal flag wouldn't be cleared until the calibration method indicates that calibrations are "complete". This could cause numerous problems including stuck beacons. Taken-From: FreeBSD --- sys/dev/netif/ath/ath/if_ath.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/sys/dev/netif/ath/ath/if_ath.c b/sys/dev/netif/ath/ath/if_ath.c index 279fc7c..d86a724 100644 --- a/sys/dev/netif/ath/ath/if_ath.c +++ b/sys/dev/netif/ath/ath/if_ath.c @@ -1671,6 +1671,7 @@ ath_reset(struct ifnet *ifp) struct ath_hal *ah = sc->sc_ah; HAL_STATUS status; + kprintf("ath_reset\n"); ath_hal_intrset(ah, 0); /* disable interrupts */ ath_draintxq(sc); /* stop xmit side */ ath_stoprecv(sc); /* stop recv side */ @@ -5420,6 +5421,7 @@ ath_calibrate_callout(void *arg) longCal = (ticks - sc->sc_lastlongcal >= ath_longcalinterval*hz); if (longCal) { sc->sc_stats.ast_per_cal++; + sc->sc_lastlongcal = ticks; if (ath_hal_getrfgain(ah) == HAL_RFGAIN_NEED_CHANGE) { /* * Rfgain is out of bounds, reset the chip @@ -5468,7 +5470,6 @@ restart: nextcal *= 10; } else { nextcal = ath_longcalinterval*hz; - sc->sc_lastlongcal = ticks; if (sc->sc_lastcalreset == 0) sc->sc_lastcalreset = sc->sc_lastlongcal; else if (ticks - sc->sc_lastcalreset >= ath_resetcalinterval*hz) -- 1.7.7.2