aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2008-10-22 16:28:45 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:54 -0400
commit5c020dc6a0f75de3cd75d9cca3b589abc1826fc5 (patch)
tree3b70d0b8ad905871f669add6dda016737b4cfae0 /drivers/net/wireless/ath9k/main.c
parentf97e40078e44c1db96269286adc0b12dc8eae3c2 (diff)
ath9k: Allow user to change tx power when asked
We were also changing tx power even when we were not asked to, this enforces the change only when we are asked nicely. When not asked we simply try to use the max power, we don't tx power at all for rate control. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index a7656a3ea1b0..795fed5cadfa 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -1250,7 +1250,8 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1250 sc->sc_ah->ah_channels[pos].chanmode = 1250 sc->sc_ah->ah_channels[pos].chanmode =
1251 ath_get_extchanmode(sc, curchan); 1251 ath_get_extchanmode(sc, curchan);
1252 1252
1253 sc->sc_config.txpowlimit = 2 * conf->power_level; 1253 if (changed & IEEE80211_CONF_CHANGE_POWER)
1254 sc->sc_config.txpowlimit = 2 * conf->power_level;
1254 1255
1255 /* set h/w channel */ 1256 /* set h/w channel */
1256 if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0) 1257 if (ath_set_channel(sc, &sc->sc_ah->ah_channels[pos]) < 0)