summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-01-06 23:23:56 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:53 -0500
commit2bf30fabadbdcb535b057afc92aba015884847dc (patch)
tree7a0234aeb666602e7b25a62bb7e483be0fb4a742 /net/mac80211
parent8465676241cad5e28a1b745c32a0e18e1f67e18e (diff)
mac80211: remove user_power_level from driver API
I missed this during review of "mac80211: Fix tx power setting", the user_power_level shouldn't be available to the driver but rather be an internal value used to calculate the value for the driver. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/main.c4
-rw-r--r--net/mac80211/wext.c2
3 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 85c4d3144f9..fa5ca14517f 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -705,6 +705,8 @@ struct ieee80211_local {
struct work_struct dynamic_ps_disable_work;
struct timer_list dynamic_ps_timer;
+ int user_power_level; /* in dBm */
+
#ifdef CONFIG_MAC80211_DEBUGFS
struct local_debugfsdentries {
struct dentry *rcdir;
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index dca4b7da6ca..b55b9970dc9 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.user_power_level)
+ if (!local->user_power_level)
power = chan->max_power;
else
- power = min(chan->max_power, local->hw.conf.user_power_level);
+ power = min(chan->max_power, local->user_power_level);
if (local->hw.conf.power_level != power) {
changed |= IEEE80211_CONF_CHANGE_POWER;
local->hw.conf.power_level = power;
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index bb2c7135a1c..5690c3d41e7 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -551,7 +551,7 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev,
else /* Automatic power level setting */
new_power_level = chan->max_power;
- local->hw.conf.user_power_level = new_power_level;
+ local->user_power_level = new_power_level;
if (local->hw.conf.power_level != new_power_level)
reconf_flags |= IEEE80211_CONF_CHANGE_POWER;