aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-04-26 15:04:37 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-27 16:09:18 -0400
commit597a94b340f98bf4596ef59e938875afaa1815d6 (patch)
tree2c9ccb53c907ccd97465c414655c38ce735f3555 /drivers
parent7f9f3600695bf68d11cdcf278d39f02eaadc3a00 (diff)
ath9k_hw: use the configured power limit for AR9003
Since the new AR9003 EEPROM code does tune the card for the configured tx power level, we need to fill in the correct power limits in the TPC part of the DMA descriptor. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mac.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 5d92be47c5a5..79b0e2874731 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -1817,6 +1817,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
1817 u8 twiceMaxRegulatoryPower, 1817 u8 twiceMaxRegulatoryPower,
1818 u8 powerLimit) 1818 u8 powerLimit)
1819{ 1819{
1820 ah->txpower_limit = powerLimit;
1820 ar9003_hw_set_target_power_eeprom(ah, chan->channel); 1821 ar9003_hw_set_target_power_eeprom(ah, chan->channel);
1821 ar9003_hw_calibration_apply(ah, chan->channel); 1822 ar9003_hw_calibration_apply(ah, chan->channel);
1822} 1823}
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
index 7d111fbf8bc5..37ba37481a47 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
@@ -311,6 +311,9 @@ static void ar9003_hw_set11n_txdesc(struct ath_hw *ah, void *ds,
311{ 311{
312 struct ar9003_txc *ads = (struct ar9003_txc *) ds; 312 struct ar9003_txc *ads = (struct ar9003_txc *) ds;
313 313
314 if (txpower > ah->txpower_limit)
315 txpower = ah->txpower_limit;
316
314 txpower += ah->txpower_indexoffset; 317 txpower += ah->txpower_indexoffset;
315 if (txpower > 63) 318 if (txpower > 63)
316 txpower = 63; 319 txpower = 63;
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index bc682da28b2a..77245dff5993 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -719,6 +719,7 @@ struct ath_hw {
719 u32 *addac5416_21; 719 u32 *addac5416_21;
720 u32 *bank6Temp; 720 u32 *bank6Temp;
721 721
722 u8 txpower_limit;
722 int16_t txpower_indexoffset; 723 int16_t txpower_indexoffset;
723 int coverage_class; 724 int coverage_class;
724 u32 beacon_interval; 725 u32 beacon_interval;