svn commit: r225421 - head/sys/dev/ath/ath_hal/ar5416
Adrian Chadd
adrian at FreeBSD.org
Tue Sep 6 10:54:56 UTC 2011
Author: adrian
Date: Tue Sep 6 10:54:56 2011
New Revision: 225421
URL: http://svn.freebsd.org/changeset/base/225421
Log:
Fix 5ghz calibration logic when using AR9280 w/ fast clock.
When the fast clock (44mhz) is enabled for 5ghz HT20, the
dual ADCs aren't enabled. Trying to do the ADC calibrations
here would result in calibration never completing; this
resulted in IQ calibration never running and thus performance
issues in 11a/11n HT20 mode.
Leave it enabled for non-fastclock (40mhz) 11a mode and
HT40 modes.
This has been fixed in discussion with Felix Fietkau (nbd)
and discussions with the Atheros baseband team.
Linux ath9k now has a similar fix.
Approved by: re (kib)
Modified:
head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Sep 6 10:49:05 2011 (r225420)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Tue Sep 6 10:54:56 2011 (r225421)
@@ -72,16 +72,17 @@ ar5416IsCalSupp(struct ath_hal *ah, cons
return !IEEE80211_IS_CHAN_B(chan);
case ADC_GAIN_CAL:
case ADC_DC_CAL:
- /* Run ADC Gain Cal for either 5ghz any or 2ghz HT40 */
/*
- * Merlin (AR9280) doesn't ever complete ADC calibrations
- * in 5ghz non-HT40 mode (ie, HT20, 11a). For now, disable
- * it for Merlin only until further information is
- * available.
+ * Run ADC Gain Cal for either 5ghz any or 2ghz HT40.
+ *
+ * Don't run ADC calibrations for 5ghz fast clock mode
+ * in HT20 - only one ADC is used.
*/
- if (! AR_SREV_MERLIN(ah))
- if (IEEE80211_IS_CHAN_5GHZ(chan))
- return AH_TRUE;
+ if (IEEE80211_IS_CHAN_HT20(chan) &&
+ (IS_5GHZ_FAST_CLOCK_EN(ah, chan)))
+ return AH_FALSE;
+ if (IEEE80211_IS_CHAN_5GHZ(chan))
+ return AH_TRUE;
if (IEEE80211_IS_CHAN_HT40(chan))
return AH_TRUE;
return AH_FALSE;
More information about the svn-src-head
mailing list