From: Johannes Berg Date: Tue, 16 Sep 2008 18:22:21 +0000 (+0200) Subject: mac80211: allow interface settings changes only when down X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f8b25cdad719cddceb9cf0d350065b3e59e74219;p=linux-beck.git 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 Signed-off-by: John W. Linville --- diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index a8501f14b167..89a183c2327a 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,