ath9k: merge a fix for tx power limit testing

SVN-Revision: 28143
This commit is contained in:
Felix Fietkau 2011-09-01 18:15:03 +00:00
parent 44616eca49
commit 99e422472c

View file

@ -296,6 +296,22 @@
rx_lat = MS(reg, AR_USEC_RX_LAT); rx_lat = MS(reg, AR_USEC_RX_LAT);
tx_lat = MS(reg, AR_USEC_TX_LAT); tx_lat = MS(reg, AR_USEC_TX_LAT);
@@ -2441,13 +2450,13 @@ void ath9k_hw_set_txpowerlimit(struct at
struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
struct ath9k_channel *chan = ah->curchan;
struct ieee80211_channel *channel = chan->chan;
- int reg_pwr = min_t(int, MAX_RATE_POWER, regulatory->power_limit);
+ int reg_pwr = min_t(int, MAX_RATE_POWER, limit);
int chan_pwr = channel->max_power * 2;
if (test)
reg_pwr = chan_pwr = MAX_RATE_POWER;
- regulatory->power_limit = min(limit, (u32) MAX_RATE_POWER);
+ regulatory->power_limit = reg_pwr;
ah->eep_ops->set_txpower(ah, chan,
ath9k_regd_get_ctl(regulatory, chan),
--- a/drivers/net/wireless/ath/ath9k/reg.h --- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h +++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -619,6 +619,7 @@ @@ -619,6 +619,7 @@