From owner-svn-src-all@FreeBSD.ORG Thu Jun 10 20:23:21 2010 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 09BA11065709; Thu, 10 Jun 2010 20:23:21 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (unknown [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC1648FC23; Thu, 10 Jun 2010 20:23:20 +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 o5AKNK44055502; Thu, 10 Jun 2010 20:23:20 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o5AKNK0A055500; Thu, 10 Jun 2010 20:23:20 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201006102023.o5AKNK0A055500@svn.freebsd.org> From: Rui Paulo Date: Thu, 10 Jun 2010 20:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209008 - stable/8/sys/dev/ath/ath_hal/ar5416 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: Thu, 10 Jun 2010 20:23:21 -0000 Author: rpaulo Date: Thu Jun 10 20:23:20 2010 New Revision: 209008 URL: http://svn.freebsd.org/changeset/base/209008 Log: MFC r208703: Fix an off by one in ar9285SetPowerCalTable(). Found with: Coverity Prevent(tm) CID: 3979 Approved by: re (kensmit) Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/geom/sched/ (props changed) Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c ============================================================================== --- stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c Thu Jun 10 20:20:46 2010 (r209007) +++ stable/8/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c Thu Jun 10 20:23:20 2010 (r209008) @@ -634,7 +634,7 @@ ar9285SetPowerCalTable(struct ath_hal *a OS_REG_WRITE(ah, AR_PHY_TPCRG1, (OS_REG_READ(ah, AR_PHY_TPCRG1) & ~(AR_PHY_TPCRG1_NUM_PD_GAIN | AR_PHY_TPCRG1_PD_GAIN_1 | AR_PHY_TPCRG1_PD_GAIN_2 | AR_PHY_TPCRG1_PD_GAIN_3)) | SM(numXpdGain - 1, AR_PHY_TPCRG1_NUM_PD_GAIN) | SM(xpdGainValues[0], AR_PHY_TPCRG1_PD_GAIN_1 ) | - SM(xpdGainValues[1], AR_PHY_TPCRG1_PD_GAIN_2) | SM(xpdGainValues[2], AR_PHY_TPCRG1_PD_GAIN_3)); + SM(xpdGainValues[1], AR_PHY_TPCRG1_PD_GAIN_2) | SM(0, AR_PHY_TPCRG1_PD_GAIN_3)); for (i = 0; i < AR5416_MAX_CHAINS; i++) {