From owner-svn-src-all@FreeBSD.ORG Fri Mar 11 04:31:01 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AD96106564A; Fri, 11 Mar 2011 04:31:01 +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 0A1F38FC13; Fri, 11 Mar 2011 04:31:01 +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 p2B4V0cs065859; Fri, 11 Mar 2011 04:31:00 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2B4V0mt065857; Fri, 11 Mar 2011 04:31:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103110431.p2B4V0mt065857@svn.freebsd.org> From: Adrian Chadd Date: Fri, 11 Mar 2011 04:31:00 +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: r219475 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2011 04:31:01 -0000 Author: adrian Date: Fri Mar 11 04:31:00 2011 New Revision: 219475 URL: http://svn.freebsd.org/changeset/base/219475 Log: Bring over the same fix from the AR5416 PDADC calibration code. The ath9k driver has a unified boundary/pdadc function, whereas ours is split into two (one for each EEPROM type.) This is why the AR9280 check is done here where we could safely assume it'll always be AR9280 or later. Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Fri Mar 11 03:46:27 2011 (r219474) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_reset.c Fri Mar 11 04:31:00 2011 (r219475) @@ -727,7 +727,10 @@ ar9285GetGainBoundariesAndPdadcs(struct /* Find starting index for this pdGain */ if (i == 0) { - ss = 0; /* for the first pdGain, start from index 0 */ + if (AR_SREV_MERLIN_20_OR_LATER(ah)) + ss = (int16_t)(0 - (minPwrT4[i] / 2)); + else + ss = 0; /* for the first pdGain, start from index 0 */ } else { /* need overlap entries extrapolated below. */ ss = (int16_t)((pPdGainBoundaries[i-1] - (minPwrT4[i] / 2)) - tPdGainOverlap + 1 + minDelta);