|
@@ -2942,16 +2942,19 @@ void ath9k_hw_apply_txpower(struct ath_hw *ah, struct ath9k_channel *chan,
|
|
|
struct ath_regulatory *reg = ath9k_hw_regulatory(ah);
|
|
|
struct ieee80211_channel *channel;
|
|
|
int chan_pwr, new_pwr;
|
|
|
+ u16 ctl = NO_CTL;
|
|
|
|
|
|
if (!chan)
|
|
|
return;
|
|
|
|
|
|
+ if (!test)
|
|
|
+ ctl = ath9k_regd_get_ctl(reg, chan);
|
|
|
+
|
|
|
channel = chan->chan;
|
|
|
chan_pwr = min_t(int, channel->max_power * 2, MAX_RATE_POWER);
|
|
|
new_pwr = min_t(int, chan_pwr, reg->power_limit);
|
|
|
|
|
|
- ah->eep_ops->set_txpower(ah, chan,
|
|
|
- ath9k_regd_get_ctl(reg, chan),
|
|
|
+ ah->eep_ops->set_txpower(ah, chan, ctl,
|
|
|
get_antenna_gain(ah, chan), new_pwr, test);
|
|
|
}
|
|
|
|