Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 493ca5ef authored by Nick Kossifidis's avatar Nick Kossifidis Committed by John W. Linville
Browse files

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: default avatarNick Kossifidis <mickflemm@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 75505199
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;