summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2011-01-20 08:40:22 +0000
committeradrian <adrian@FreeBSD.org>2011-01-20 08:40:22 +0000
commit909155a389d12e197df24b089d5a9236c8b19358 (patch)
tree83848e161388105b948f641c802151f1546d3dcf /sys/dev
parent32ba03116c2a866801627dbcb310cac3c2342839 (diff)
downloadFreeBSD-src-909155a389d12e197df24b089d5a9236c8b19358.zip
FreeBSD-src-909155a389d12e197df24b089d5a9236c8b19358.tar.gz
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.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_cal.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
index f4d1dc5..7fab84e 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c
@@ -40,6 +40,23 @@ static int16_t ar5416GetNf(struct ath_hal *, struct ieee80211_channel *);
/*
* 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)
OpenPOWER on IntegriCloud