aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-09 06:18:51 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 19:00:07 -0400
commite8975581f63870be42ff4662b293d1b0c8c21350 (patch)
tree3d0d67e73d009ea6480b459585c0a70fc35fa9da /net/mac80211/wext.c
parent0f4ac38b5999c3d51adad52d61c56c1b99c247ec (diff)
mac80211: introduce hw config change flags
This makes mac80211 notify the driver which configuration actually changed, e.g. channel etc. No driver changes, this is just plumbing, driver authors are expected to act on this if they want to. Also remove the HW CONFIG debug printk, it's incorrect, often we configure something else. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c14
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
995static int ieee80211_ioctl_giwpower(struct net_device *dev, 995static int ieee80211_ioctl_giwpower(struct net_device *dev,