From: Nick Kossifidis Date: Sun, 5 Aug 2012 19:35:35 +0000 (+0300) Subject: ath5k: Preserve tx power level requested from above on phy_init X-Git-Tag: v3.7-rc1~70^2~42^2~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=493ca5ef4ec8a7e8396d6ab26f48de66bdf73dca;p=platform%2Fupstream%2Fkernel-adaptation-pc.git ath5k: Preserve tx power level requested from above on phy_init By using cur_pwr on phy_init we re-use the power level previously set by the driver, not the one we got from above. Signed-off-by: Nick Kossifidis Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c index 84a9aaf..27ca993 100644 --- a/drivers/net/wireless/ath/ath5k/phy.c +++ b/drivers/net/wireless/ath/ath5k/phy.c @@ -3802,8 +3802,8 @@ ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel, * RF buffer settings on 5211/5212+ so that we * properly set curve indices. */ - ret = ath5k_hw_txpower(ah, channel, ah->ah_txpower.txp_cur_pwr ? - ah->ah_txpower.txp_cur_pwr / 2 : AR5K_TUNE_MAX_TXPOWER); + ret = ath5k_hw_txpower(ah, channel, ah->power_level ? + ah->power_level * 2 : AR5K_TUNE_MAX_TXPOWER); if (ret) return ret;