summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/ath_hal
diff options
context:
space:
mode:
authorrpaulo <rpaulo@FreeBSD.org>2010-06-01 14:37:11 +0000
committerrpaulo <rpaulo@FreeBSD.org>2010-06-01 14:37:11 +0000
commitc435d700654b55d634ee8c9779b17f62fb84a96f (patch)
tree253d0951a1b72e7c3f208c36c04bc7da97dbb490 /sys/dev/ath/ath_hal
parente5a26a05f993bbbdd7e17599cc2b1b99a69af4f9 (diff)
downloadFreeBSD-src-c435d700654b55d634ee8c9779b17f62fb84a96f.zip
FreeBSD-src-c435d700654b55d634ee8c9779b17f62fb84a96f.tar.gz
Fix an off by one in ar9285SetPowerCalTable().
Found with: Coverity Prevent(tm) CID: 3979 MFC after: 3 days
Diffstat (limited to 'sys/dev/ath/ath_hal')
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar9285_reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c b/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c
index 8c2de10..4f695a7 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c
@@ -634,7 +634,7 @@ ar9285SetPowerCalTable(struct ath_hal *ah, struct ar5416eeprom_4k *pEepData,
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++) {
OpenPOWER on IntegriCloud