summaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-07-09 14:40:36 +0200
committerJohn W. Linville <linville@tuxdriver.com>2008-07-14 14:30:07 -0400
commitf3947e2dfa3b18f375b7acd03b7ee2877d0751fc (patch)
tree3f68e55a214e638f1210883958d0746610c9dcf8 /net/mac80211/wext.c
parent75636525fbfa78fa33fd754c89785cfde750acd3 (diff)
downloadlinux-f3947e2dfa3b18f375b7acd03b7ee2877d0751fc.tar.bz2
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 <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index f2fdd3342195..c041db9556c7 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);
}