diff options
author | Felix Fietkau <nbd@openwrt.org> | 2010-10-19 21:08:53 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-11-15 13:23:14 -0500 |
commit | de40f316c01b1ba9535e6dc99f6a67e7655b07da (patch) | |
tree | 65a2b4647415eb0f2f878fc56ae559576449e8f1 /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 6b7b6cf553f881d45bb37a73f5db956afb290a08 (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/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 6 |
1 files changed, 3 insertions, 3 deletions
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 | } |
2166 | EXPORT_SYMBOL(ath9k_hw_disable); | 2166 | EXPORT_SYMBOL(ath9k_hw_disable); |
2167 | 2167 | ||
2168 | void ath9k_hw_set_txpowerlimit(struct ath_hw *ah, u32 limit) | 2168 | void 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 | } |
2183 | EXPORT_SYMBOL(ath9k_hw_set_txpowerlimit); | 2183 | EXPORT_SYMBOL(ath9k_hw_set_txpowerlimit); |
2184 | 2184 | ||