svn commit: r209008 - stable/8/sys/dev/ath/ath_hal/ar5416

Rui Paulo rpaulo at FreeBSD.org
Thu Jun 10 20:23:21 UTC 2010


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++) {
 


More information about the svn-src-stable-8 mailing list