diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-01-06 17:23:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:53 -0500 |
commit | 2bf30fabadbdcb535b057afc92aba015884847dc (patch) | |
tree | 7a0234aeb666602e7b25a62bb7e483be0fb4a742 /net/mac80211 | |
parent | 8465676241cad5e28a1b745c32a0e18e1f67e18e (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.h | 2 | ||||
-rw-r--r-- | net/mac80211/main.c | 4 | ||||
-rw-r--r-- | net/mac80211/wext.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 85c4d3144f9f..fa5ca14517f5 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -705,6 +705,8 @@ struct ieee80211_local { | |||
705 | struct work_struct dynamic_ps_disable_work; | 705 | struct work_struct dynamic_ps_disable_work; |
706 | struct timer_list dynamic_ps_timer; | 706 | struct timer_list dynamic_ps_timer; |
707 | 707 | ||
708 | int user_power_level; /* in dBm */ | ||
709 | |||
708 | #ifdef CONFIG_MAC80211_DEBUGFS | 710 | #ifdef CONFIG_MAC80211_DEBUGFS |
709 | struct local_debugfsdentries { | 711 | struct local_debugfsdentries { |
710 | struct dentry *rcdir; | 712 | struct dentry *rcdir; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index dca4b7da6cad..b55b9970dc97 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) | |||
214 | changed |= IEEE80211_CONF_CHANGE_CHANNEL; | 214 | changed |= IEEE80211_CONF_CHANGE_CHANNEL; |
215 | } | 215 | } |
216 | 216 | ||
217 | if (!local->hw.conf.user_power_level) | 217 | if (!local->user_power_level) |
218 | power = chan->max_power; | 218 | power = chan->max_power; |
219 | else | 219 | else |
220 | power = min(chan->max_power, local->hw.conf.user_power_level); | 220 | power = min(chan->max_power, local->user_power_level); |
221 | if (local->hw.conf.power_level != power) { | 221 | if (local->hw.conf.power_level != power) { |
222 | changed |= IEEE80211_CONF_CHANGE_POWER; | 222 | changed |= IEEE80211_CONF_CHANGE_POWER; |
223 | local->hw.conf.power_level = power; | 223 | local->hw.conf.power_level = power; |
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index bb2c7135a1c8..5690c3d41e7d 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -551,7 +551,7 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev, | |||
551 | else /* Automatic power level setting */ | 551 | else /* Automatic power level setting */ |
552 | new_power_level = chan->max_power; | 552 | new_power_level = chan->max_power; |
553 | 553 | ||
554 | local->hw.conf.user_power_level = new_power_level; | 554 | local->user_power_level = new_power_level; |
555 | if (local->hw.conf.power_level != new_power_level) | 555 | if (local->hw.conf.power_level != new_power_level) |
556 | reconf_flags |= IEEE80211_CONF_CHANGE_POWER; | 556 | reconf_flags |= IEEE80211_CONF_CHANGE_POWER; |
557 | 557 | ||