summaryrefslogtreecommitdiffstats
path: root/net/mac80211/main.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vasanth@atheros.com>2008-12-24 13:53:11 +0530
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:36 -0500
commite3c92df08cbf6a0cb60a9c7ce377378383967e07 (patch)
tree088d70d7924c6dac0e900d4190db928623ec3c76 /net/mac80211/main.c
parenta085ff718c8c9f14c44feb337774fadfd982e1a5 (diff)
downloadlinux-stable-e3c92df08cbf6a0cb60a9c7ce377378383967e07.tar.gz
linux-stable-e3c92df08cbf6a0cb60a9c7ce377378383967e07.tar.bz2
linux-stable-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/main.c')
-rw-r--r--net/mac80211/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index a6cb480dda0d..dca4b7da6cad 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -214,10 +214,10 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed)
changed |= IEEE80211_CONF_CHANGE_CHANNEL;
}
- if (!local->hw.conf.power_level)
+ if (!local->hw.conf.user_power_level)
power = chan->max_power;
else
- power = min(chan->max_power, local->hw.conf.power_level);
+ power = min(chan->max_power, local->hw.conf.user_power_level);
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;
local->hw.conf.power_level = power;