summaryrefslogtreecommitdiff
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-09 10:18:51 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2008-10-31 23:00:07 (GMT)
commite8975581f63870be42ff4662b293d1b0c8c21350 (patch)
tree3d0d67e73d009ea6480b459585c0a70fc35fa9da /net/mac80211/wext.c
parent0f4ac38b5999c3d51adad52d61c56c1b99c247ec (diff)
downloadlinux-fsl-qoriq-e8975581f63870be42ff4662b293d1b0c8c21350.tar.xz
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 a3af151..94c4b35 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -656,7 +656,7 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev,
union iwreq_data *data, char *extra)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
- bool need_reconfig = 0;
+ u32 reconf_flags = 0;
int new_power_level;
if ((data->txpower.flags & IW_TXPOW_TYPE) != IW_TXPOW_DBM)
@@ -680,17 +680,17 @@ static int ieee80211_ioctl_siwtxpower(struct net_device *dev,
if (local->hw.conf.power_level != new_power_level) {
local->hw.conf.power_level = new_power_level;
- need_reconfig = 1;
+ reconf_flags |= IEEE80211_CONF_CHANGE_POWER;
}
if (local->hw.conf.radio_enabled != !(data->txpower.disabled)) {
local->hw.conf.radio_enabled = !(data->txpower.disabled);
- need_reconfig = 1;
+ reconf_flags |= IEEE80211_CONF_CHANGE_RADIO_ENABLED;
ieee80211_led_radio(local, local->hw.conf.radio_enabled);
}
- if (need_reconfig)
- ieee80211_hw_config(local);
+ if (reconf_flags)
+ ieee80211_hw_config(local, reconf_flags);
return 0;
}
@@ -976,7 +976,7 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,
if (wrq->disabled) {
conf->flags &= ~IEEE80211_CONF_PS;
- return ieee80211_hw_config(local);
+ return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
}
switch (wrq->flags & IW_POWER_MODE) {
@@ -989,7 +989,7 @@ static int ieee80211_ioctl_siwpower(struct net_device *dev,
return -EINVAL;
}
- return ieee80211_hw_config(local);
+ return ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
}
static int ieee80211_ioctl_giwpower(struct net_device *dev,