From owner-svn-src-head@FreeBSD.ORG Thu Jan 20 08:40:23 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 037ED106566B; Thu, 20 Jan 2011 08:40:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E60C28FC12; Thu, 20 Jan 2011 08:40:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0K8eMmc006483; Thu, 20 Jan 2011 08:40:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0K8eMuu006481; Thu, 20 Jan 2011 08:40:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201101200840.p0K8eMuu006481@svn.freebsd.org> From: Adrian Chadd Date: Thu, 20 Jan 2011 08:40:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217629 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Jan 2011 08:40:23 -0000 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)