diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2009-01-09 12:44:15 (GMT) |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 21:00:15 (GMT) |
commit | a8302de934b5d1897ff146cd0c7ab87d1417c092 (patch) | |
tree | 5a73ad4dd787cc02e14aa8975d267adb5812d8fe /net/mac80211/main.c | |
parent | 01f8162a854df7f9c259c839ad3c1168ac13b7b8 (diff) | |
download | linux-a8302de934b5d1897ff146cd0c7ab87d1417c092.tar.xz |
mac80211: Handle power constraint level advertised in 11d+h beacon
This patch uses power constraint level while determining the maximum
transmit power, there by it makes sure that any power mitigation
requirement for the channel in the current regulatory domain is met.
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.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index e9f3e85..c78304d 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -214,10 +214,16 @@ int ieee80211_hw_config(struct ieee80211_local *local, u32 changed) changed |= IEEE80211_CONF_CHANGE_CHANNEL; } - if (!local->user_power_level) + if (local->sw_scanning) power = chan->max_power; else - power = min(chan->max_power, local->user_power_level); + power = local->power_constr_level ? + (chan->max_power - local->power_constr_level) : + chan->max_power; + + if (local->user_power_level) + power = min(power, local->user_power_level); + if (local->hw.conf.power_level != power) { changed |= IEEE80211_CONF_CHANGE_POWER; local->hw.conf.power_level = power; |