diff options
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r-- | net/mac80211/wext.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index a3af15141244..94c4b35eeb14 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -656,7 +656,7 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev, | |||
656 | union iwreq_data *data, char *extra) | 656 | union iwreq_data *data, char *extra) |
657 | { | 657 | { |
658 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 658 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
659 | bool need_reconfig = 0; | 659 | u32 reconf_flags = 0; |
660 | int new_power_level; | 660 | int new_power_level; |
661 | 661 | ||
662 | if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) | 662 | if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM) |
@@ -680,17 +680,17 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev, | |||
680 | 680 | ||
681 | if (local->hw.conf.power_level != new_power_level) { | 681 | if (local->hw.conf.power_level != new_power_level) { |
682 | local->hw.conf.power_level = new_power_level; | 682 | local->hw.conf.power_level = new_power_level; |
683 | need_reconfig = 1; | 683 | reconf_flags |= IEEE80211_CONF_CHANGE_POWER; |
684 | } | 684 | } |
685 | 685 | ||
686 | if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) { | 686 | if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) { |
687 | local->hw.conf.radio_enabled = !(data->txpower.disabled); | 687 | local->hw.conf.radio_enabled = !(data->txpower.disabled); |
688 | need_reconfig = 1; | 688 | reconf_flags |= IEEE80211_CONF_CHANGE_RADIO_ENABLED; |
689 | ieee80211_led_radio(local, local->hw.conf.radio_enabled); | 689 | ieee80211_led_radio(local, local->hw.conf.radio_enabled); |
690 | } | 690 | } |
691 | 691 | ||
692 | if (need_reconfig) | 692 | if (reconf_flags) |
693 | ieee80211_hw_config(local); | 693 | ieee80211_hw_config(local, reconf_flags); |
694 | 694 | ||
695 | return 0; | 695 | return 0; |
696 | } | 696 | } |
@@ -976,7 +976,7 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev, | |||
976 | 976 | ||
977 | if (wrq->disabled) { | 977 | if (wrq->disabled) { |
978 | conf->flags &= ~IEEE80211_CONF_PS; | 978 | conf->flags &= ~IEEE80211_CONF_PS; |
979 | return ieee80211_hw_config(local); | 979 | return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); |
980 | } | 980 | } |
981 | 981 | ||
982 | switch (wrq->flags & IW_POWER_MODE) { | 982 | switch (wrq->flags & IW_POWER_MODE) { |
@@ -989,7 +989,7 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev, | |||
989 | return -EINVAL; | 989 | return -EINVAL; |
990 | } | 990 | } |
991 | 991 | ||
992 | return ieee80211_hw_config(local); | 992 | return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS); |
993 | } | 993 | } |
994 | 994 | ||
995 | static int ieee80211_ioctl_giwpower(struct net_device *dev, | 995 | static int ieee80211_ioctl_giwpower(struct net_device *dev, |