aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/eeprom_def.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-04-14 20:35:19 +0200
committerJohn W. Linville <linville@tuxdriver.com>2012-04-16 14:38:51 -0400
commitd9e9145e497f2cb9a3891a065342ca0593824aa2 (patch)
tree619f8873b1e2fc1914d59728b71ebc96ec137440 /drivers/net/wireless/ath/ath9k/eeprom_def.c
parentnet/wireless: use module_pci_driver (diff)
downloadlinux-dev-d9e9145e497f2cb9a3891a065342ca0593824aa2.tar.xz
linux-dev-d9e9145e497f2cb9a3891a065342ca0593824aa2.zip
ath9k: use ath9k_hw_update_regulatory_maxpower in ath9k_hw_def_set_txpower
We have a helper function for updating the max_power_level value. Use that and remove the duplicated code. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_def.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_def.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 619b95d764ff..43f554eb632d 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -1263,20 +1263,7 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
regulatory->max_power_level = ratesArray[i];
}
- switch(ar5416_get_ntxchains(ah->txchainmask)) {
- case 1:
- break;
- case 2:
- regulatory->max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
- break;
- case 3:
- regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
- break;
- default:
- ath_dbg(ath9k_hw_common(ah), EEPROM,
- "Invalid chainmask configuration\n");
- break;
- }
+ ath9k_hw_update_regulatory_maxpower(ah);
if (test)
return;