aboutsummaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-16 20:22:21 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-09-24 16:18:00 -0400
commitf8b25cdad719cddceb9cf0d350065b3e59e74219 (patch)
treea27b82759919f499c96323e795f9c02d8a0ca7b4 /net/mac80211
parent723b038def23ce0606754c4f598cbb96bae9a102 (diff)
mac80211: allow interface settings changes only when down
We currently allow monitor flags changes and mesh ID changes when the interface is up, which can lead to trouble. Change it to only allow when down. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a8501f14b16..89a183c2327 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -100,6 +100,9 @@ static int ieee80211_change_iface(struct wiphy *wiphy, int ifindex,
if (ret)
return ret;
+ if (netif_running(sdata->dev))
+ return -EBUSY;
+
if (ieee80211_vif_is_mesh(&sdata->vif) && params->mesh_id_len)
ieee80211_sdata_set_mesh_id(sdata,
params->mesh_id_len,