aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c34
1 files changed, 4 insertions, 30 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 700e4b5081b6..d5e42d13bd67 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -109,7 +109,7 @@
109#include <linux/netpoll.h> 109#include <linux/netpoll.h>
110#include <linux/rcupdate.h> 110#include <linux/rcupdate.h>
111#include <linux/delay.h> 111#include <linux/delay.h>
112#include <linux/wireless.h> 112#include <net/wext.h>
113#include <net/iw_handler.h> 113#include <net/iw_handler.h>
114#include <asm/current.h> 114#include <asm/current.h>
115#include <linux/audit.h> 115#include <linux/audit.h>
@@ -2348,12 +2348,6 @@ static const struct file_operations ptype_seq_fops = {
2348}; 2348};
2349 2349
2350 2350
2351#ifdef CONFIG_WIRELESS_EXT
2352extern int wireless_proc_init(void);
2353#else
2354#define wireless_proc_init() 0
2355#endif
2356
2357static int __init dev_proc_init(void) 2351static int __init dev_proc_init(void)
2358{ 2352{
2359 int rc = -ENOMEM; 2353 int rc = -ENOMEM;
@@ -2365,7 +2359,7 @@ static int __init dev_proc_init(void)
2365 if (!proc_net_fops_create("ptype", S_IRUGO, &ptype_seq_fops)) 2359 if (!proc_net_fops_create("ptype", S_IRUGO, &ptype_seq_fops))
2366 goto out_dev2; 2360 goto out_dev2;
2367 2361
2368 if (wireless_proc_init()) 2362 if (wext_proc_init())
2369 goto out_softnet; 2363 goto out_softnet;
2370 rc = 0; 2364 rc = 0;
2371out: 2365out:
@@ -2923,29 +2917,9 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
2923 ret = -EFAULT; 2917 ret = -EFAULT;
2924 return ret; 2918 return ret;
2925 } 2919 }
2926#ifdef CONFIG_WIRELESS_EXT
2927 /* Take care of Wireless Extensions */ 2920 /* Take care of Wireless Extensions */
2928 if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) { 2921 if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST)
2929 /* If command is `set a parameter', or 2922 return wext_handle_ioctl(&ifr, cmd, arg);
2930 * `get the encoding parameters', check if
2931 * the user has the right to do it */
2932 if (IW_IS_SET(cmd) || cmd == SIOCGIWENCODE
2933 || cmd == SIOCGIWENCODEEXT) {
2934 if (!capable(CAP_NET_ADMIN))
2935 return -EPERM;
2936 }
2937 dev_load(ifr.ifr_name);
2938 rtnl_lock();
2939 /* Follow me in net/wireless/wext.c */
2940 ret = wireless_process_ioctl(&ifr, cmd);
2941 rtnl_unlock();
2942 if (IW_IS_GET(cmd) &&
2943 copy_to_user(arg, &ifr,
2944 sizeof(struct ifreq)))
2945 ret = -EFAULT;
2946 return ret;
2947 }
2948#endif /* CONFIG_WIRELESS_EXT */
2949 return -EINVAL; 2923 return -EINVAL;
2950 } 2924 }
2951} 2925}