Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2010 20:23:20 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r209008 - stable/8/sys/dev/ath/ath_hal/ar5416
Message-ID:  <201006102023.o5AKNK0A055500@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++) {
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201006102023.o5AKNK0A055500>