From c86c3aa3d989e26dd7f07bef51bec950e95a7727 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sat, 30 Jul 2011 13:21:33 +0000 Subject: [PATCH] I noticed that the Merlin NICs I had (AR9220, AR9280) never completed the ADC calibrations if the NIC is in 5ghz 11a or 5ghz HT/20 modes. I've been told that the dual-ADC is only engaged in turbo/40mhz modes. Since Sowl (AR9160) seems to return valid-looking calibration data in 5ghz 20MHz modes, I'm only disabling it for Merlin for now. It may turn out I can disable it for all chipsets and only enable it for 40MHz modes. Approved by: re (kib) --- sys/dev/ath/ath_hal/ar5416/ar5416_cal.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c index af7b732183f4..e0ebda1748f5 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c @@ -73,8 +73,15 @@ ar5416IsCalSupp(struct ath_hal *ah, const struct ieee80211_channel *chan, case ADC_GAIN_CAL: case ADC_DC_CAL: /* Run ADC Gain Cal for either 5ghz any or 2ghz HT40 */ - if (IEEE80211_IS_CHAN_5GHZ(chan)) - return AH_TRUE; + /* + * 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. + */ + if (! AR_SREV_MERLIN(ah)) + if (IEEE80211_IS_CHAN_5GHZ(chan)) + return AH_TRUE; if (IEEE80211_IS_CHAN_HT40(chan)) return AH_TRUE; return AH_FALSE;