Commit 597a94b3 authored by Felix Fietkau's avatar Felix Fietkau Committed by John W. Linville

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: default avatarFelix Fietkau <nbd@openwrt.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 7f9f3600
...@@ -1817,6 +1817,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah, ...@@ -1817,6 +1817,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
u8 twiceMaxRegulatoryPower, u8 twiceMaxRegulatoryPower,
u8 powerLimit) u8 powerLimit)
{ {
ah->txpower_limit = powerLimit;
ar9003_hw_set_target_power_eeprom(ah, chan->channel); ar9003_hw_set_target_power_eeprom(ah, chan->channel);
ar9003_hw_calibration_apply(ah, chan->channel); ar9003_hw_calibration_apply(ah, chan->channel);
} }
......
...@@ -311,6 +311,9 @@ static void ar9003_hw_set11n_txdesc(struct ath_hw *ah, void *ds, ...@@ -311,6 +311,9 @@ static void ar9003_hw_set11n_txdesc(struct ath_hw *ah, void *ds,
{ {
struct ar9003_txc *ads = (struct ar9003_txc *) ds; struct ar9003_txc *ads = (struct ar9003_txc *) ds;
if (txpower > ah->txpower_limit)
txpower = ah->txpower_limit;
txpower += ah->txpower_indexoffset; txpower += ah->txpower_indexoffset;
if (txpower > 63) if (txpower > 63)
txpower = 63; txpower = 63;
......
...@@ -719,6 +719,7 @@ struct ath_hw { ...@@ -719,6 +719,7 @@ struct ath_hw {
u32 *addac5416_21; u32 *addac5416_21;
u32 *bank6Temp; u32 *bank6Temp;
u8 txpower_limit;
int16_t txpower_indexoffset; int16_t txpower_indexoffset;
int coverage_class; int coverage_class;
u32 beacon_interval; u32 beacon_interval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment