diff options
-rw-r--r-- | include/net/mac80211.h | 2 | ||||
-rw-r--r-- | net/mac80211/main.c | 4 | ||||
-rw-r--r-- | net/mac80211/wext.c | 5 |
3 files changed, 6 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 9d67fdf1c26..ffcbd12775a 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -546,6 +546,7 @@ 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) | ||
549 | * @channel: the channel to tune to | 550 | * @channel: the channel to tune to |
550 | * @ht: the HT configuration for the device | 551 | * @ht: the HT configuration for the device |
551 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame | 552 | * @long_frame_max_tx_count: Maximum number of transmissions for a "long" frame |
@@ -559,6 +560,7 @@ struct ieee80211_conf { | |||
559 | int beacon_int; | 560 | int beacon_int; |
560 | u32 flags; | 561 | u32 flags; |
561 | int power_level; | 562 | int power_level; |
563 | int user_power_level; | ||
562 | 564 | ||
563 | u16 listen_interval; | 565 | u16 listen_interval; |
564 | bool radio_enabled; | 566 | bool radio_enabled; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index a6cb480dda0..dca4b7da6ca 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.power_level) | 217 | if (!local->hw.conf.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.power_level); | 220 | power = min(chan->max_power, local->hw.conf.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 48fc6b9a62a..654041b9373 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -549,10 +549,9 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev, | |||
549 | else /* Automatic power level setting */ | 549 | else /* Automatic power level setting */ |
550 | new_power_level = chan->max_power; | 550 | new_power_level = chan->max_power; |
551 | 551 | ||
552 | if (local->hw.conf.power_level != new_power_level) { | 552 | local->hw.conf.user_power_level = new_power_level; |
553 | local->hw.conf.power_level = new_power_level; | 553 | if (local->hw.conf.power_level != new_power_level) |
554 | reconf_flags |= IEEE80211_CONF_CHANGE_POWER; | 554 | reconf_flags |= IEEE80211_CONF_CHANGE_POWER; |
555 | } | ||
556 | 555 | ||
557 | if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) { | 556 | if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) { |
558 | local->hw.conf.radio_enabled = !(data->txpower.disabled); | 557 | local->hw.conf.radio_enabled = !(data->txpower.disabled); |