aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-01-06 17:23:56 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:53 -0500
commit2bf30fabadbdcb535b057afc92aba015884847dc (patch)
tree7a0234aeb666602e7b25a62bb7e483be0fb4a742
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>
-rw-r--r--include/net/mac80211.h2
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/main.c4
-rw-r--r--net/mac80211/wext.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9215b1ec90ec..0ffe932942fd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -546,7 +546,6 @@ enum ieee80211_conf_changed {
546 * @listen_interval: listen interval in units of beacon interval 546 * @listen_interval: listen interval in units of beacon interval
547 * @flags: configuration flags defined above 547 * @flags: configuration flags defined above
548 * @power_level: requested transmit power (in dBm) 548 * @power_level: requested transmit power (in dBm)
549 * @user_power_level: User configured transmit power (in dBm)
550 * @channel: the channel to tune to 549 * @channel: the channel to tune to
551 * @ht: the HT configuration for the device 550 * @ht: the HT configuration for the device
552 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame 551 * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame
@@ -560,7 +559,6 @@ struct ieee80211_conf {
560 int beacon_int; 559 int beacon_int;
561 u32 flags; 560 u32 flags;
562 int power_level; 561 int power_level;
563 int user_power_level;
564 562
565 u16 listen_interval; 563 u16 listen_interval;
566 bool radio_enabled; 564 bool radio_enabled;
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