aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-10-19 21:08:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-11-15 13:23:14 -0500
commitde40f316c01b1ba9535e6dc99f6a67e7655b07da (patch)
tree65a2b4647415eb0f2f878fc56ae559576449e8f1 /drivers
parent6b7b6cf553f881d45bb37a73f5db956afb290a08 (diff)
ath9k_hw: extend ath9k_hw_set_txpowerlimit to test channel txpower
ath9k_hw_set_txpowerlimit gets an extra boolean parameter that - if set - causes the rate txpower table and the regulatory limit to be calculated and stored, without changing hardware registers. 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/ar5008_phy.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c20
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_phy.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom.h3
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_4k.c9
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_9287.c27
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_def.c62
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c2
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c6
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h2
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c2
11 files changed, 79 insertions, 58 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar5008_phy.c b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
index ea9f4497f58c..777a602176f2 100644
--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -873,7 +873,7 @@ static int ar5008_hw_process_ini(struct ath_hw *ah,
873 channel->max_antenna_gain * 2, 873 channel->max_antenna_gain * 2,
874 channel->max_power * 2, 874 channel->max_power * 2,
875 min((u32) MAX_RATE_POWER, 875 min((u32) MAX_RATE_POWER,
876 (u32) regulatory->power_limit)); 876 (u32) regulatory->power_limit), false);
877 877
878 /* Write analog registers */ 878 /* Write analog registers */
879 if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) { 879 if (!ath9k_hw_set_rf_regs(ah, chan, freqIndex)) {
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 92cfef225477..a88fe0d6142f 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -2131,7 +2131,7 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
2131 struct ath9k_channel *chan, u16 cfgCtl, 2131 struct ath9k_channel *chan, u16 cfgCtl,
2132 u8 twiceAntennaReduction, 2132 u8 twiceAntennaReduction,
2133 u8 twiceMaxRegulatoryPower, 2133 u8 twiceMaxRegulatoryPower,
2134 u8 powerLimit) 2134 u8 powerLimit, bool test)
2135{ 2135{
2136 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 2136 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
2137 struct ath_common *common = ath9k_hw_common(ah); 2137 struct ath_common *common = ath9k_hw_common(ah);
@@ -2145,7 +2145,16 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
2145 twiceMaxRegulatoryPower, 2145 twiceMaxRegulatoryPower,
2146 powerLimit); 2146 powerLimit);
2147 2147
2148 while (i < ar9300RateSize) { 2148 regulatory->max_power_level = 0;
2149 for (i = 0; i < ar9300RateSize; i++) {
2150 if (targetPowerValT2[i] > regulatory->max_power_level)
2151 regulatory->max_power_level = targetPowerValT2[i];
2152 }
2153
2154 if (test)
2155 return;
2156
2157 for (i = 0; i < ar9300RateSize; i++) {
2149 ath_print(common, ATH_DBG_EEPROM, 2158 ath_print(common, ATH_DBG_EEPROM,
2150 "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]); 2159 "TPC[%02d] 0x%08x ", i, targetPowerValT2[i]);
2151 i++; 2160 i++;
@@ -2160,9 +2169,6 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
2160 i++; 2169 i++;
2161 } 2170 }
2162 2171
2163 /* Write target power array to registers */
2164 ar9003_hw_tx_power_regwrite(ah, targetPowerValT2);
2165
2166 /* 2172 /*
2167 * This is the TX power we send back to driver core, 2173 * This is the TX power we send back to driver core,
2168 * and it can use to pass to userspace to display our 2174 * and it can use to pass to userspace to display our
@@ -2181,8 +2187,10 @@ static void ath9k_hw_ar9300_set_txpower(struct ath_hw *ah,
2181 i = ALL_TARGET_HT20_0_8_16; /* ht20 */ 2187 i = ALL_TARGET_HT20_0_8_16; /* ht20 */
2182 2188
2183 ah->txpower_limit = targetPowerValT2[i]; 2189 ah->txpower_limit = targetPowerValT2[i];
2184 regulatory->max_power_level = ratesArray[i]; 2190 regulatory->max_power_level = targetPowerValT2[i];
2185 2191
2192 /* Write target power array to registers */
2193 ar9003_hw_tx_power_regwrite(ah, targetPowerValT2);
2186 ar9003_hw_calibration_apply(ah, chan->channel); 2194 ar9003_hw_calibration_apply(ah, chan->channel);
2187} 2195}
2188 2196
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 669b777729b3..06a9c4cd2f44 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -614,7 +614,7 @@ static int ar9003_hw_process_ini(struct ath_hw *ah,
614 channel->max_antenna_gain * 2, 614 channel->max_antenna_gain * 2,
615 channel->max_power * 2, 615 channel->max_power * 2,
616 min((u32) MAX_RATE_POWER, 616 min((u32) MAX_RATE_POWER,
617 (u32) regulatory->power_limit)); 617 (u32) regulatory->power_limit), false);
618 618
619 return 0; 619 return 0;
620} 620}
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h
index dacb45e1b906..3c99830dab0c 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/eeprom.h
@@ -680,7 +680,8 @@ struct eeprom_ops {
680 void (*set_addac)(struct ath_hw *hw, struct ath9k_channel *chan); 680 void (*set_addac)(struct ath_hw *hw, struct ath9k_channel *chan);
681 void (*set_txpower)(struct ath_hw *hw, struct ath9k_channel *chan, 681 void (*set_txpower)(struct ath_hw *hw, struct ath9k_channel *chan,
682 u16 cfgCtl, u8 twiceAntennaReduction, 682 u16 cfgCtl, u8 twiceAntennaReduction,
683 u8 twiceMaxRegulatoryPower, u8 powerLimit); 683 u8 twiceMaxRegulatoryPower, u8 powerLimit,
684 bool test);
684 u16 (*get_spur_channel)(struct ath_hw *ah, u16 i, bool is2GHz); 685 u16 (*get_spur_channel)(struct ath_hw *ah, u16 i, bool is2GHz);
685}; 686};
686 687
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
index 4fa4d8e28c64..c40c534c6662 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
@@ -726,7 +726,7 @@ static void ath9k_hw_4k_set_txpower(struct ath_hw *ah,
726 u16 cfgCtl, 726 u16 cfgCtl,
727 u8 twiceAntennaReduction, 727 u8 twiceAntennaReduction,
728 u8 twiceMaxRegulatoryPower, 728 u8 twiceMaxRegulatoryPower,
729 u8 powerLimit) 729 u8 powerLimit, bool test)
730{ 730{
731 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 731 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
732 struct ar5416_eeprom_4k *pEepData = &ah->eeprom.map4k; 732 struct ar5416_eeprom_4k *pEepData = &ah->eeprom.map4k;
@@ -751,15 +751,20 @@ static void ath9k_hw_4k_set_txpower(struct ath_hw *ah,
751 751
752 ath9k_hw_set_4k_power_cal_table(ah, chan, &txPowerIndexOffset); 752 ath9k_hw_set_4k_power_cal_table(ah, chan, &txPowerIndexOffset);
753 753
754 regulatory->max_power_level = 0;
754 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) { 755 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) {
755 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]); 756 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]);
756 if (ratesArray[i] > AR5416_MAX_RATE_POWER) 757 if (ratesArray[i] > AR5416_MAX_RATE_POWER)
757 ratesArray[i] = AR5416_MAX_RATE_POWER; 758 ratesArray[i] = AR5416_MAX_RATE_POWER;
759
760 if (ratesArray[i] > regulatory->max_power_level)
761 regulatory->max_power_level = ratesArray[i];
758 } 762 }
759 763
764 if (test)
765 return;
760 766
761 /* Update regulatory */ 767 /* Update regulatory */
762
763 i = rate6mb; 768 i = rate6mb;
764 if (IS_CHAN_HT40(chan)) 769 if (IS_CHAN_HT40(chan))
765 i = rateHt40_0; 770 i = rateHt40_0;
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
index 966b9496a9dd..ebf7a89f547c 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
@@ -853,7 +853,7 @@ static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah,
853 struct ath9k_channel *chan, u16 cfgCtl, 853 struct ath9k_channel *chan, u16 cfgCtl,
854 u8 twiceAntennaReduction, 854 u8 twiceAntennaReduction,
855 u8 twiceMaxRegulatoryPower, 855 u8 twiceMaxRegulatoryPower,
856 u8 powerLimit) 856 u8 powerLimit, bool test)
857{ 857{
858 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 858 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
859 struct ar9287_eeprom *pEepData = &ah->eeprom.map9287; 859 struct ar9287_eeprom *pEepData = &ah->eeprom.map9287;
@@ -877,12 +877,26 @@ static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah,
877 877
878 ath9k_hw_set_ar9287_power_cal_table(ah, chan, &txPowerIndexOffset); 878 ath9k_hw_set_ar9287_power_cal_table(ah, chan, &txPowerIndexOffset);
879 879
880 regulatory->max_power_level = 0;
880 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) { 881 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) {
881 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]); 882 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]);
882 if (ratesArray[i] > AR9287_MAX_RATE_POWER) 883 if (ratesArray[i] > AR9287_MAX_RATE_POWER)
883 ratesArray[i] = AR9287_MAX_RATE_POWER; 884 ratesArray[i] = AR9287_MAX_RATE_POWER;
885
886 if (ratesArray[i] > regulatory->max_power_level)
887 regulatory->max_power_level = ratesArray[i];
884 } 888 }
885 889
890 if (test)
891 return;
892
893 if (IS_CHAN_2GHZ(chan))
894 i = rate1l;
895 else
896 i = rate6mb;
897
898 regulatory->max_power_level = ratesArray[i];
899
886 if (AR_SREV_9280_20_OR_LATER(ah)) { 900 if (AR_SREV_9280_20_OR_LATER(ah)) {
887 for (i = 0; i < Ar5416RateSize; i++) 901 for (i = 0; i < Ar5416RateSize; i++)
888 ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2; 902 ratesArray[i] -= AR9287_PWR_TABLE_OFFSET_DB * 2;
@@ -971,17 +985,6 @@ static void ath9k_hw_ar9287_set_txpower(struct ath_hw *ah,
971 | ATH9K_POW_SM(ratesArray[rateDupOfdm], 8) 985 | ATH9K_POW_SM(ratesArray[rateDupOfdm], 8)
972 | ATH9K_POW_SM(ratesArray[rateDupCck], 0)); 986 | ATH9K_POW_SM(ratesArray[rateDupCck], 0));
973 } 987 }
974
975 if (IS_CHAN_2GHZ(chan))
976 i = rate1l;
977 else
978 i = rate6mb;
979
980 if (AR_SREV_9280_20_OR_LATER(ah))
981 regulatory->max_power_level =
982 ratesArray[i] + AR9287_PWR_TABLE_OFFSET_DB * 2;
983 else
984 regulatory->max_power_level = ratesArray[i];
985} 988}
986 989
987static void ath9k_hw_ar9287_set_addac(struct ath_hw *ah, 990static void ath9k_hw_ar9287_set_addac(struct ath_hw *ah,
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 76b4d65472dd..a819ddc9fdbc 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -1258,7 +1258,7 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
1258 u16 cfgCtl, 1258 u16 cfgCtl,
1259 u8 twiceAntennaReduction, 1259 u8 twiceAntennaReduction,
1260 u8 twiceMaxRegulatoryPower, 1260 u8 twiceMaxRegulatoryPower,
1261 u8 powerLimit) 1261 u8 powerLimit, bool test)
1262{ 1262{
1263#define RT_AR_DELTA(x) (ratesArray[x] - cck_ofdm_delta) 1263#define RT_AR_DELTA(x) (ratesArray[x] - cck_ofdm_delta)
1264 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 1264 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
@@ -1285,12 +1285,44 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
1285 1285
1286 ath9k_hw_set_def_power_cal_table(ah, chan, &txPowerIndexOffset); 1286 ath9k_hw_set_def_power_cal_table(ah, chan, &txPowerIndexOffset);
1287 1287
1288 regulatory->max_power_level = 0;
1288 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) { 1289 for (i = 0; i < ARRAY_SIZE(ratesArray); i++) {
1289 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]); 1290 ratesArray[i] = (int16_t)(txPowerIndexOffset + ratesArray[i]);
1290 if (ratesArray[i] > AR5416_MAX_RATE_POWER) 1291 if (ratesArray[i] > AR5416_MAX_RATE_POWER)
1291 ratesArray[i] = AR5416_MAX_RATE_POWER; 1292 ratesArray[i] = AR5416_MAX_RATE_POWER;
1293 if (ratesArray[i] > regulatory->max_power_level)
1294 regulatory->max_power_level = ratesArray[i];
1292 } 1295 }
1293 1296
1297 if (!test) {
1298 i = rate6mb;
1299
1300 if (IS_CHAN_HT40(chan))
1301 i = rateHt40_0;
1302 else if (IS_CHAN_HT20(chan))
1303 i = rateHt20_0;
1304
1305 regulatory->max_power_level = ratesArray[i];
1306 }
1307
1308 switch(ar5416_get_ntxchains(ah->txchainmask)) {
1309 case 1:
1310 break;
1311 case 2:
1312 regulatory->max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
1313 break;
1314 case 3:
1315 regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
1316 break;
1317 default:
1318 ath_print(ath9k_hw_common(ah), ATH_DBG_EEPROM,
1319 "Invalid chainmask configuration\n");
1320 break;
1321 }
1322
1323 if (test)
1324 return;
1325
1294 if (AR_SREV_9280_20_OR_LATER(ah)) { 1326 if (AR_SREV_9280_20_OR_LATER(ah)) {
1295 for (i = 0; i < Ar5416RateSize; i++) { 1327 for (i = 0; i < Ar5416RateSize; i++) {
1296 int8_t pwr_table_offset; 1328 int8_t pwr_table_offset;
@@ -1387,34 +1419,6 @@ static void ath9k_hw_def_set_txpower(struct ath_hw *ah,
1387 REG_WRITE(ah, AR_PHY_POWER_TX_SUB, 1419 REG_WRITE(ah, AR_PHY_POWER_TX_SUB,
1388 ATH9K_POW_SM(pModal->pwrDecreaseFor3Chain, 6) 1420 ATH9K_POW_SM(pModal->pwrDecreaseFor3Chain, 6)
1389 | ATH9K_POW_SM(pModal->pwrDecreaseFor2Chain, 0)); 1421 | ATH9K_POW_SM(pModal->pwrDecreaseFor2Chain, 0));
1390
1391 i = rate6mb;
1392
1393 if (IS_CHAN_HT40(chan))
1394 i = rateHt40_0;
1395 else if (IS_CHAN_HT20(chan))
1396 i = rateHt20_0;
1397
1398 if (AR_SREV_9280_20_OR_LATER(ah))
1399 regulatory->max_power_level =
1400 ratesArray[i] + AR5416_PWR_TABLE_OFFSET_DB * 2;
1401 else
1402 regulatory->max_power_level = ratesArray[i];
1403
1404 switch(ar5416_get_ntxchains(ah->txchainmask)) {
1405 case 1:
1406 break;
1407 case 2:
1408 regulatory->max_power_level += INCREASE_MAXPOW_BY_TWO_CHAIN;
1409 break;
1410 case 3:
1411 regulatory->max_power_level += INCREASE_MAXPOW_BY_THREE_CHAIN;
1412 break;
1413 default:
1414 ath_print(ath9k_hw_common(ah), ATH_DBG_EEPROM,
1415 "Invalid chainmask configuration\n");
1416 break;
1417 }
1418} 1422}
1419 1423
1420static u8 ath9k_hw_def_get_num_ant_config(struct ath_hw *ah, 1424static u8 ath9k_hw_def_get_num_ant_config(struct ath_hw *ah,
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 9a3be8da755d..26b9a16ce33f 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -29,7 +29,7 @@ static void ath_update_txpow(struct ath9k_htc_priv *priv)
29 struct ath_hw *ah = priv->ah; 29 struct ath_hw *ah = priv->ah;
30 30
31 if (priv->curtxpow != priv->txpowlimit) { 31 if (priv->curtxpow != priv->txpowlimit) {
32 ath9k_hw_set_txpowerlimit(ah, priv->txpowlimit); 32 ath9k_hw_set_txpowerlimit(ah, priv->txpowlimit, false);
33 /* read back in case value is clamped */ 33 /* read back in case value is clamped */
34 priv->curtxpow = ath9k_hw_regulatory(ah)->power_limit; 34 priv->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
35 } 35 }
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index d37a8ad03d74..e75d8e8cf4d2 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1166,7 +1166,7 @@ static bool ath9k_hw_channel_change(struct ath_hw *ah,
1166 channel->max_antenna_gain * 2, 1166 channel->max_antenna_gain * 2,
1167 channel->max_power * 2, 1167 channel->max_power * 2,
1168 min((u32) MAX_RATE_POWER, 1168 min((u32) MAX_RATE_POWER,
1169 (u32) regulatory->power_limit)); 1169 (u32) regulatory->power_limit), false);
1170 1170
1171 ath9k_hw_rfbus_done(ah); 1171 ath9k_hw_rfbus_done(ah);
1172 1172
@@ -2165,7 +2165,7 @@ bool ath9k_hw_disable(struct ath_hw *ah)
2165} 2165}
2166EXPORT_SYMBOL(ath9k_hw_disable); 2166EXPORT_SYMBOL(ath9k_hw_disable);
2167 2167
2168void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit) 2168void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test)
2169{ 2169{
2170 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah); 2170 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
2171 struct ath9k_channel *chan = ah->curchan; 2171 struct ath9k_channel *chan = ah->curchan;
@@ -2178,7 +2178,7 @@ void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit)
2178 channel->max_antenna_gain * 2, 2178 channel->max_antenna_gain * 2,
2179 channel->max_power * 2, 2179 channel->max_power * 2,
2180 min((u32) MAX_RATE_POWER, 2180 min((u32) MAX_RATE_POWER,
2181 (u32) regulatory->power_limit)); 2181 (u32) regulatory->power_limit), test);
2182} 2182}
2183EXPORT_SYMBOL(ath9k_hw_set_txpowerlimit); 2183EXPORT_SYMBOL(ath9k_hw_set_txpowerlimit);
2184 2184
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index e68204ae899c..366f088dc15d 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -860,7 +860,7 @@ u32 ath9k_hw_getrxfilter(struct ath_hw *ah);
860void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits); 860void ath9k_hw_setrxfilter(struct ath_hw *ah, u32 bits);
861bool ath9k_hw_phy_disable(struct ath_hw *ah); 861bool ath9k_hw_phy_disable(struct ath_hw *ah);
862bool ath9k_hw_disable(struct ath_hw *ah); 862bool ath9k_hw_disable(struct ath_hw *ah);
863void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit); 863void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit, bool test);
864void ath9k_hw_setopmode(struct ath_hw *ah); 864void ath9k_hw_setopmode(struct ath_hw *ah);
865void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1); 865void ath9k_hw_setmcastfilter(struct ath_hw *ah, u32 filter0, u32 filter1);
866void ath9k_hw_setbssidmask(struct ath_hw *ah); 866void ath9k_hw_setbssidmask(struct ath_hw *ah);
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 7185ef3a3bff..92ed5bb71196 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -23,7 +23,7 @@ static void ath_update_txpow(struct ath_softc *sc)
23 struct ath_hw *ah = sc->sc_ah; 23 struct ath_hw *ah = sc->sc_ah;
24 24
25 if (sc->curtxpow != sc->config.txpowlimit) { 25 if (sc->curtxpow != sc->config.txpowlimit) {
26 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit); 26 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit, false);
27 /* read back in case value is clamped */ 27 /* read back in case value is clamped */
28 sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit; 28 sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
29 } 29 }