[kernel] add missing config symbol
[openwrt.git] / package / mac80211 / patches / 554-ath9k_test_txpower.patch
1 --- a/drivers/net/wireless/ath/ath9k/hw.c
2 +++ b/drivers/net/wireless/ath/ath9k/hw.c
3 @@ -2442,15 +2442,18 @@ void ath9k_hw_set_txpowerlimit(struct at
4 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
5 struct ath9k_channel *chan = ah->curchan;
6 struct ieee80211_channel *channel = chan->chan;
7 + int reg_pwr = min_t(int, MAX_RATE_POWER, regulatory->power_limit);
8 + int chan_pwr = channel->max_power * 2;
9 +
10 + if (test)
11 + reg_pwr = chan_pwr = MAX_RATE_POWER;
12
13 regulatory->power_limit = min(limit, (u32) MAX_RATE_POWER);
14
15 ah->eep_ops->set_txpower(ah, chan,
16 ath9k_regd_get_ctl(regulatory, chan),
17 channel->max_antenna_gain * 2,
18 - channel->max_power * 2,
19 - min((u32) MAX_RATE_POWER,
20 - (u32) regulatory->power_limit), test);
21 + chan_pwr, reg_pwr, test);
22 }
23 EXPORT_SYMBOL(ath9k_hw_set_txpowerlimit);
24
This page took 0.045184 seconds and 5 git commands to generate.