diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2008-12-24 09:23:11 +0100 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 21:59:36 +0100 |
commit | e3c92df08cbf6a0cb60a9c7ce377378383967e07 (patch) | |
tree | 088d70d7924c6dac0e900d4190db928623ec3c76 /net/mac80211/wext.c | |
parent | ath9k: fix sparse warnings (diff) | |
download | linux-e3c92df08cbf6a0cb60a9c7ce377378383967e07.tar.xz linux-e3c92df08cbf6a0cb60a9c7ce377378383967e07.zip |
mac80211: Fix tx power setting
power_level in ieee80211_conf is being used for more than one
purpose. It being used as user configured power limit and the
final power limit given to the driver. By doing so, except very
first time, the tx power limit is taken from min(chan->max_power,
local->hw.conf.power_level) which is not what we want. This patch
defines a new memeber in ieee80211_conf which is meant only for
user configured power limit.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r-- | net/mac80211/wext.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 48fc6b9a62a4..654041b93736 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c @@ -549,10 +549,9 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev, else /* Automatic power level setting */ new_power_level = chan->max_power; - if (local->hw.conf.power_level != new_power_level) { - local->hw.conf.power_level = new_power_level; + local->hw.conf.user_power_level = new_power_level; + if (local->hw.conf.power_level != new_power_level) reconf_flags |= IEEE80211_CONF_CHANGE_POWER; - } if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) { local->hw.conf.radio_enabled = !(data->txpower.disabled); |