Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] mac80211: allow interface settings changes only when down
@ 2008-09-16 18:22 Johannes Berg
  0 siblings, 0 replies; only message in thread
From: Johannes Berg @ 2008-09-16 18:22 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

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>
---
 net/mac80211/cfg.c |    3 +++
 1 file changed, 3 insertions(+)

--- everything.orig/net/mac80211/cfg.c	2008-09-16 20:19:48.000000000 +0200
+++ everything/net/mac80211/cfg.c	2008-09-16 20:20:37.000000000 +0200
@@ -102,6 +102,9 @@ static int ieee80211_change_iface(struct
 	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,



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-16 18:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-16 18:22 [PATCH] mac80211: allow interface settings changes only when down Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox