From owner-svn-src-user@FreeBSD.ORG Fri Sep 2 08:00:58 2011 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23640106566C; Fri, 2 Sep 2011 08:00:58 +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 12DF88FC0C; Fri, 2 Sep 2011 08:00:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p8280veZ088093; Fri, 2 Sep 2011 08:00:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p8280vte088091; Fri, 2 Sep 2011 08:00:57 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201109020800.p8280vte088091@svn.freebsd.org> From: Adrian Chadd Date: Fri, 2 Sep 2011 08:00:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r225323 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 08:00:58 -0000 Author: adrian Date: Fri Sep 2 08:00:57 2011 New Revision: 225323 URL: http://svn.freebsd.org/changeset/base/225323 Log: Another thing to merge into -HEAD : fix ADC calibration. Merlin NICs which are doing fast clock in 5ghz mode (ie 44/88mhz instead of 40/80mhz) don't require the dual ADC calibration in HT20 mode. This should be merged into -HEAD. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Fri Sep 2 07:53:26 2011 (r225322) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_cal.c Fri Sep 2 08:00:57 2011 (r225323) @@ -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;