aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath9k/eeprom.c
diff options
context:
space:
mode:
authorSujith2009-02-12 10:06:36 +0530
committerJohn W. Linville2009-02-27 14:51:42 -0500
commite421c7b35c17752dbe6d26d910eb2d6814073355 (patch)
tree0aadf5babeefb224cd2a56ec8ba7ddba159959c0 /drivers/net/wireless/ath9k/eeprom.c
parent469002983fc90c2ff0959e2b03335c0fe2e4d5a9 (diff)
ath9k: Store the correct max TX power level
This patch fixes a bug where the max power level was being calculated incorrectly. Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/eeprom.c')
-rw-r--r--drivers/net/wireless/ath9k/eeprom.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/eeprom.c b/drivers/net/wireless/ath9k/eeprom.c
index b55e9920a5d4..34e9d818fadd 100644
--- a/drivers/net/wireless/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath9k/eeprom.c
@@ -2615,6 +2615,21 @@ static int ath9k_hw_def_set_txpower(struct ath_hw *ah,
else
ah->regulatory.max_power_level = ratesArray[i];
+ switch(ar5416_get_ntxchains(ah->txchainmask)) {
+ case 1:
+ break;
+ case 2:
+ ah->regulatory.max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
+ break;
+ case 3:
+ ah->regulatory.max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
+ break;
+ default:
+ DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
+ "Invalid chainmask configuration\n");
+ break;
+ }
+
return 0;
}