svn commit: r217629 - head/sys/dev/ath/ath_hal/ar5416
Adrian Chadd
adrian at FreeBSD.org
Thu Jan 20 08:40:23 UTC 2011
Author: adrian
Date: Thu Jan 20 08:40:22 2011
New Revision: 217629
URL: http://svn.freebsd.org/changeset/base/217629
Log:
Add a comment from my local HAL about what is actually going on here
with these ADC DC Gain/Offset calibrations.
The whole idea is to calibrate a pair of ADCs to compensate for any
differences between them.
The AR5416 returns lots of garbage, so there's no need to do the
calibration there.
The AR9160 returns 0 for secondary ADCs when calibrating 2.4ghz 20mhz
modes. It returns valid data for the secondary ADCs when calibrating
2.4ghz HT/40 and any 5ghz mode.
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 Thu Jan 20 08:19:23 2011 (r217628)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Thu Jan 20 08:40:22 2011 (r217629)
@@ -40,6 +40,23 @@ static int16_t ar5416GetNf(struct ath_ha
/*
* Determine if calibration is supported by device and channel flags
*/
+
+/*
+ * ADC GAIN/DC offset calibration is for calibrating two ADCs that
+ * are acting as one by interleaving incoming symbols. This isn't
+ * relevant for 2.4GHz 20MHz wide modes because, as far as I can tell,
+ * the secondary ADC is never enabled. It is enabled however for
+ * 5GHz modes.
+ *
+ * It hasn't been confirmed whether doing this calibration is needed
+ * at all in the above modes and/or whether it's actually harmful.
+ * So for now, let's leave it enabled and just remember to get
+ * confirmation that it needs to be clarified.
+ *
+ * See US Patent No: US 7,541,952 B1:
+ * " Method and Apparatus for Offset and Gain Compensation for
+ * Analog-to-Digital Converters."
+ */
static OS_INLINE HAL_BOOL
ar5416IsCalSupp(struct ath_hal *ah, const struct ieee80211_channel *chan,
HAL_CAL_TYPE calType)
More information about the svn-src-head
mailing list