diff options
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 | ||