diff options
author | Rajkumar Manoharan <rmanoharan@atheros.com> | 2011-01-31 21:17:44 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-02-04 00:44:43 +0300 |
commit | 5048e8c378d095a548fe8a6ecd2f07d277ac5be2 (patch) | |
tree | d396e3226b9ac0425fbef775566130f72f0c7da2 /drivers/net/wireless/ath/ath9k/common.c | |
parent | c344c9cb01d1dc65f2d5c85f22790e7f01d7dcd8 (diff) | |
download | linux-5048e8c378d095a548fe8a6ecd2f07d277ac5be2.tar.xz |
ath9k: move update tx power to common
move ath_update_txpow to common to remove code duplication
in both ath9k & ath9k_htc.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/common.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common.c b/drivers/net/wireless/ath/ath9k/common.c index df1998d48253..615e68276e72 100644 --- a/drivers/net/wireless/ath/ath9k/common.c +++ b/drivers/net/wireless/ath/ath9k/common.c @@ -189,6 +189,17 @@ void ath9k_cmn_btcoex_bt_stomp(struct ath_common *common, } EXPORT_SYMBOL(ath9k_cmn_btcoex_bt_stomp); +void ath9k_cmn_update_txpow(struct ath_hw *ah, u16 cur_txpow, + u16 new_txpow, u16 *txpower) +{ + if (cur_txpow != new_txpow) { + ath9k_hw_set_txpowerlimit(ah, new_txpow, false); + /* read back in case value is clamped */ + *txpower = ath9k_hw_regulatory(ah)->power_limit; + } +} +EXPORT_SYMBOL(ath9k_cmn_update_txpow); + static int __init ath9k_cmn_init(void) { return 0; |