diff options
author | Joe Perches <joe@perches.com> | 2010-12-02 22:12:38 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-12-07 16:34:48 -0500 |
commit | a1cbc7a88985976267a851a2e1080578711b3b0d (patch) | |
tree | 299c4621d0da27789b6f0fdc08bf8c8984236172 /drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |
parent | 226afe68fdbd1aa3680158aca0a3631cbd019626 (diff) |
ath: Fix ath_dbg access beyond array bound
ar9300RateSize is not necessarily a power of 4.
Change ar9003_hw_set_target_power_eeprom
to print the targetPowerValT2 array one per line.
ath9k_hw_ar9300_set_txpower repeated the output 4 times per line,
change it to print the targetPowerValT2 value one per line.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_eeprom.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 59236ffd517..8c4961001b6 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -4089,22 +4089,9 @@ static void ar9003_hw_set_target_power_eeprom(struct ath_hw *ah, u16 freq, | |||
4089 | ar9003_hw_eeprom_get_ht40_tgt_pwr(ah, HT_TARGET_RATE_23, freq, | 4089 | ar9003_hw_eeprom_get_ht40_tgt_pwr(ah, HT_TARGET_RATE_23, freq, |
4090 | is2GHz) + ht40PowerIncForPdadc; | 4090 | is2GHz) + ht40PowerIncForPdadc; |
4091 | 4091 | ||
4092 | while (i < ar9300RateSize) { | 4092 | for (i = 0; i < ar9300RateSize; i++) { |
4093 | ath_dbg(common, ATH_DBG_EEPROM, | ||
4094 | "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]); | ||
4095 | i++; | ||
4096 | |||
4097 | ath_dbg(common, ATH_DBG_EEPROM, | ||
4098 | "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]); | ||
4099 | i++; | ||
4100 | |||
4101 | ath_dbg(common, ATH_DBG_EEPROM, | ||
4102 | "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]); | ||
4103 | i++; | ||
4104 | |||
4105 | ath_dbg(common, ATH_DBG_EEPROM, | 4093 | ath_dbg(common, ATH_DBG_EEPROM, |
4106 | "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]); | 4094 | "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]); |
4107 | i++; | ||
4108 | } | 4095 | } |
4109 | } | 4096 | } |
4110 | 4097 | ||
@@ -4692,17 +4679,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah, | |||
4692 | 4679 | ||
4693 | for (i = 0; i < ar9300RateSize; i++) { | 4680 | for (i = 0; i < ar9300RateSize; i++) { |
4694 | ath_dbg(common, ATH_DBG_EEPROM, | 4681 | ath_dbg(common, ATH_DBG_EEPROM, |
4695 | "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]); | 4682 | "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]); |
4696 | i++; | ||
4697 | ath_dbg(common, ATH_DBG_EEPROM, | ||
4698 | "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]); | ||
4699 | i++; | ||
4700 | ath_dbg(common, ATH_DBG_EEPROM, | ||
4701 | "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]); | ||
4702 | i++; | ||
4703 | ath_dbg(common, ATH_DBG_EEPROM, | ||
4704 | "TPC[%02d] 0x%08x\n\n", i, targetPowerValT2[i]); | ||
4705 | i++; | ||
4706 | } | 4683 | } |
4707 | 4684 | ||
4708 | /* | 4685 | /* |