From f3947e2dfa3b18f375b7acd03b7ee2877d0751fc Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Wed, 9 Jul 2008 14:40:36 +0200 Subject: mac80211: push interface checks down This patch pushes the "netif_running()" and "same type as before" checks down into ieee80211_if_change_type() to centralise the logic instead of duplicating it for cfg80211 and wext. Signed-off-by: Johannes Berg Signed-off-by: John W. Linville --- net/mac80211/wext.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'net/mac80211/wext.c') diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index f2fdd334219..c041db9556c 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c @@ -296,14 +296,7 @@ static int ieee80211_ioctl_siwmode(struct net_device *dev, return -EINVAL; } - if (type == sdata->vif.type) - return 0; - if (netif_running(dev)) - return -EBUSY; - - ieee80211_if_change_type(sdata, type); - - return 0; + return ieee80211_if_change_type(sdata, type); } -- cgit v1.2.3