From 24f5f7ee4e05cfeb45d088e8fceabf529c9fe8ca Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 25 Oct 2011 23:01:53 +0000 Subject: [PATCH] Reduce the NF wait timeout. When doing heavy 11n RX loads, this can actually interfere with traffic, as the NF load can take quite a while and poking the AGC every 10uS is just a bit silly. Instead, just leave the baseband NF calibration where it is and just read it back next time a longcal interval happens. --- sys/dev/ath/ath_hal/ar5416/ar5416_cal.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c index d51417f4992..cb578701749 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c @@ -642,7 +642,15 @@ ar5416LoadNF(struct ath_hal *ah, const struct ieee80211_channel *chan) OS_REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF); /* Wait for load to complete, should be fast, a few 10s of us. */ - if (! ar5212WaitNFCalComplete(ah, 1000)) { + /* + * XXX For now, don't be so aggressive in waiting for the NF + * XXX load to complete. A very busy 11n RX load will cause this + * XXX to always fail; so just leave it. + * XXX Later on we may wish to split longcal into two parts - one to do + * XXX the initial longcal, and one to load in an updated NF value + * XXX once it's finished - say, by checking it every 500ms. + */ + if (! ar5212WaitNFCalComplete(ah, 5)) { /* * We timed out waiting for the noisefloor to load, probably due to an * in-progress rx. Simply return here and allow the load plenty of time