aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-07-11 12:48:41 +0200
committerJohn W. Linville <linville@tuxdriver.com>2010-07-12 16:05:38 -0400
commit03b4776c408d2f4bf3a5d204e223724d154716d1 (patch)
tree6eeea11a36f4c094dea48c5f0cba651f14dafc30 /drivers
parentath9k_hw: fix a sign error in the IQ calibration code (diff)
downloadlinux-dev-03b4776c408d2f4bf3a5d204e223724d154716d1.tar.xz
linux-dev-03b4776c408d2f4bf3a5d204e223724d154716d1.zip
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.c2
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,
vpdTableI[i][sizeCurrVpdTable - 2]);
vpdStep = (int16_t)((vpdStep < 1) ? 1 : vpdStep);
- if (tgtIndex > maxIndex) {
+ if (tgtIndex >= maxIndex) {
while ((ss <= tgtIndex) &&
(k < (AR5416_NUM_PDADC_VALUES - 1))) {
tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] +