From d4c081e3624fea7a721a8a19d6359ad6772091ff Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Wed, 23 Mar 2011 03:58:55 +0000 Subject: [PATCH] The AR5416+ chips all have MIB counters (which the AR5416 ANI code assumes) so there's no need to enable the RX of invalid frames just to do ANI. The if_ath code and AR5212 ANI code setup the RX filter bits to enable receiving OFDM/CCK errors if the device doesn't have the hardware MIB counters. It isn't initialising it for the AR5416+ because all of those chips have hardware MIB counters. This fixes the odd (and performance affecting!) situation where if ani is enabled (via sysctl dev.ath.X.intmit) then suddenly there's be a very large volume of phy errors - which is good to track, but not what was intended. Since each PHY error is a received (0 length) frame, it can significantly tie up the RX side of things. --- sys/dev/ath/ath_hal/ar5416/ar5416_ani.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c b/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c index eff0f2c2d7a3..0ea3034ed37d 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_ani.c @@ -310,14 +310,10 @@ ar5416AniControl(struct ath_hal *ah, HAL_ANI_CMD cmd, int param) ahp->ah_procPhyErr &= ~HAL_ANI_ENA; /* Turn off HW counters if we have them */ ar5416AniDetach(ah); - ar5212SetRxFilter(ah, - ar5212GetRxFilter(ah) &~ HAL_RX_FILTER_PHYERR); } else { /* normal/auto mode */ /* don't mess with state if already enabled */ if (ahp->ah_procPhyErr & HAL_ANI_ENA) break; - ar5212SetRxFilter(ah, - ar5212GetRxFilter(ah) &~ HAL_RX_FILTER_PHYERR); /* Enable MIB Counters */ enableAniMIBCounters(ah, ahp->ah_curani != AH_NULL ? ahp->ah_curani->params: &ahp->ah_aniParams24 /*XXX*/);