aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h1
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c7
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index e6491bf359c..342da280c98 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -1107,6 +1107,7 @@ struct ath5k_hw {
1107 /* Values in 0.25dB units */ 1107 /* Values in 0.25dB units */
1108 s16 txp_min_pwr; 1108 s16 txp_min_pwr;
1109 s16 txp_max_pwr; 1109 s16 txp_max_pwr;
1110 s16 txp_cur_pwr;
1110 /* Values in 0.5dB units */ 1111 /* Values in 0.5dB units */
1111 s16 txp_offset; 1112 s16 txp_offset;
1112 s16 txp_ofdm; 1113 s16 txp_ofdm;
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 6f0cf3a09b2..18c58cdfde4 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -3096,7 +3096,7 @@ ath5k_setup_rate_powertable(struct ath5k_hw *ah, u16 max_pwr,
3096 3096
3097 /* Min/max in 0.25dB units */ 3097 /* Min/max in 0.25dB units */
3098 ah->ah_txpower.txp_min_pwr = 2 * rates[7]; 3098 ah->ah_txpower.txp_min_pwr = 2 * rates[7];
3099 ah->ah_txpower.txp_max_pwr = 2 * rates[0]; 3099 ah->ah_txpower.txp_cur_pwr = 2 * rates[0];
3100 ah->ah_txpower.txp_ofdm = rates[7]; 3100 ah->ah_txpower.txp_ofdm = rates[7];
3101} 3101}
3102 3102
@@ -3150,8 +3150,6 @@ ath5k_hw_txpower(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3150 /* Reset TX power values */ 3150 /* Reset TX power values */
3151 memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower)); 3151 memset(&ah->ah_txpower, 0, sizeof(ah->ah_txpower));
3152 ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER; 3152 ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER;
3153 ah->ah_txpower.txp_min_pwr = 0;
3154 ah->ah_txpower.txp_max_pwr = AR5K_TUNE_MAX_TXPOWER;
3155 3153
3156 /* Calculate the powertable */ 3154 /* Calculate the powertable */
3157 ret = ath5k_setup_channel_powertable(ah, channel, 3155 ret = ath5k_setup_channel_powertable(ah, channel,
@@ -3290,7 +3288,8 @@ int ath5k_hw_phy_init(struct ath5k_hw *ah, struct ieee80211_channel *channel,
3290 * properly set curve indices. 3288 * properly set curve indices.
3291 */ 3289 */
3292 ret = ath5k_hw_txpower(ah, channel, ee_mode, 3290 ret = ath5k_hw_txpower(ah, channel, ee_mode,
3293 ah->ah_txpower.txp_max_pwr / 2); 3291 ah->ah_txpower.txp_cur_pwr ?
3292 ah->ah_txpower.txp_cur_pwr / 2 : AR5K_TUNE_MAX_TXPOWER);
3294 if (ret) 3293 if (ret)
3295 return ret; 3294 return ret;
3296 3295