From: Johannes Berg Date: Tue, 16 Sep 2008 18:22:21 +0000 (+0200) Subject: mac80211: allow interface settings changes only when down X-Git-Tag: v2.6.28-rc1~717^2~172^2~18 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f8b25cdad719cddceb9cf0d350065b3e59e74219;p=linux-2.6-omap-h63xx.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 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,