1 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
3 @@ -4922,25 +4922,7 @@ static void ath9k_hw_ar9300_set_txpower(
4 "TPC[%02d] 0x%08x\n", i, targetPowerValT2[i]);
8 - * This is the TX power we send back to driver core,
9 - * and it can use to pass to userspace to display our
10 - * currently configured TX power setting.
12 - * Since power is rate dependent, use one of the indices
13 - * from the AR9300_Rates enum to select an entry from
14 - * targetPowerValT2[] to report. Currently returns the
15 - * power for HT40 MCS 0, HT20 MCS 0, or OFDM 6 Mbps
16 - * as CCK power is less interesting (?).
18 - i = ALL_TARGET_LEGACY_6_24; /* legacy */
19 - if (IS_CHAN_HT40(chan))
20 - i = ALL_TARGET_HT40_0_8_16; /* ht40 */
21 - else if (IS_CHAN_HT20(chan))
22 - i = ALL_TARGET_HT20_0_8_16; /* ht20 */
24 - ah->txpower_limit = targetPowerValT2[i];
25 - regulatory->max_power_level = targetPowerValT2[i];
26 + ah->txpower_limit = regulatory->max_power_level;
28 /* Write target power array to registers */
29 ar9003_hw_tx_power_regwrite(ah, targetPowerValT2);
30 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
31 +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
32 @@ -609,15 +609,6 @@ static void ath9k_hw_4k_set_txpower(stru
36 - /* Update regulatory */
38 - if (IS_CHAN_HT40(chan))
40 - else if (IS_CHAN_HT20(chan))
43 - regulatory->max_power_level = ratesArray[i];
45 if (AR_SREV_9280_20_OR_LATER(ah)) {
46 for (i = 0; i < Ar5416RateSize; i++)
47 ratesArray[i] -= AR5416_PWR_TABLE_OFFSET_DB * 2;
48 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
49 +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
50 @@ -748,13 +748,6 @@ static void ath9k_hw_ar9287_set_txpower(
54 - if (IS_CHAN_2GHZ(chan))
59 - regulatory->max_power_level = ratesArray[i];
61 if (AR_SREV_9280_20_OR_LATER(ah)) {
62 for (i = 0; i < Ar5416RateSize; i++)
63 ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2;
64 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
65 +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
66 @@ -1169,17 +1169,6 @@ static void ath9k_hw_def_set_txpower(str
67 regulatory->max_power_level = ratesArray[i];
73 - if (IS_CHAN_HT40(chan))
75 - else if (IS_CHAN_HT20(chan))
78 - regulatory->max_power_level = ratesArray[i];
81 switch(ar5416_get_ntxchains(ah->txchainmask)) {