diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-07-11 06:48:41 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:38 -0400 |
commit | 03b4776c408d2f4bf3a5d204e223724d154716d1 (patch) | |
tree | 6eeea11a36f4c094dea48c5f0cba651f14dafc30 /drivers | |
parent | 23399016d9583d799ca98ce443a1410b13c3e96e (diff) |
ath9k_hw: fix an off-by-one error in the PDADC boundaries calculation
PDADC values were only generated for values surrounding the target
index, however not for the target index itself, leading to a minor
error in the generated curve.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_def.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index 60480a1122b2..02e6c2a55fe4 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
@@ -730,7 +730,7 @@ static void ath9k_hw_get_def_gain_boundaries_pdadcs(struct ath_hw *ah, | |||
730 | vpdTableI[i][sizeCurrVpdTable - 2]); | 730 | vpdTableI[i][sizeCurrVpdTable - 2]); |
731 | vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep); | 731 | vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep); |
732 | 732 | ||
733 | if (tgtIndex > maxIndex) { | 733 | if (tgtIndex >= maxIndex) { |
734 | while ((ss <= tgtIndex) && | 734 | while ((ss <= tgtIndex) && |
735 | (k < (AR5416_NUM_PDADC_VALUES - 1))) { | 735 | (k < (AR5416_NUM_PDADC_VALUES - 1))) { |
736 | tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] + | 736 | tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] + |