ath9k: optimize power level initialization for CTL_[25]GHT20
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Sep 29 10:59:15 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=5fc512439f7a235e6b0ae05e42fa7d875fff3849
Commit: 5fc512439f7a235e6b0ae05e42fa7d875fff3849
Parent: da93c26d0b26139f33cebf9af55715452a10f374
Author: Gabor Juhos <juhosg at openwrt.org>
AuthorDate: Thu Aug 2 16:00:51 2012 +0200
Committer: John W. Linville <linville at tuxdriver.com>
CommitDate: Mon Aug 6 15:12:43 2012 -0400
ath9k: optimize power level initialization for CTL_[25]GHT20
The first part of the power array is initialized in a loop
and the last two values are initialized separately. Extend
the loop to cover the last two items, and remove the separate
initialization.
Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
Signed-off-by: John W. Linville <linville at tuxdriver.com>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 2588848..a2aa80f 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -4963,16 +4963,10 @@ static void ar9003_hw_set_power_per_rate_table(struct ath_hw *ah,
case CTL_5GHT20:
case CTL_2GHT20:
for (i = ALL_TARGET_HT20_0_8_16;
- i <= ALL_TARGET_HT20_21; i++)
+ i <= ALL_TARGET_HT20_23; i++)
pPwrArray[i] =
(u8)min((u16)pPwrArray[i],
minCtlPower);
- pPwrArray[ALL_TARGET_HT20_22] =
- (u8)min((u16)pPwrArray[ALL_TARGET_HT20_22],
- minCtlPower);
- pPwrArray[ALL_TARGET_HT20_23] =
- (u8)min((u16)pPwrArray[ALL_TARGET_HT20_23],
- minCtlPower);
break;
case CTL_5GHT40:
case CTL_2GHT40:
More information about the linux-mtd-cvs
mailing list