net/: fix the WIRELESS_EXT abuse
Subsystems (3)
PATCH 1/1 net/: fix the WIRELESS_EXT abuse
Using WIRELESS_EXT instead of CONFIG_NET_RADIO is simply ugly.
Signed-off-by Adrian Bunk <[email protected]>
---
net/core/dev.c | 10 ++++------ net/core/net-sysfs.c | 8 -------- net/socket.c | 9 +++------ 3 files changed, 7 insertions(+), 20 deletions(-)
net/core/dev.c renamed from net/core/dev.c.old +4 -6
@@ -109,10 +109,8 @@#include <linux/netpoll.h> #include <linux/rcupdate.h> #include <linux/delay.h> -#ifdef CONFIG_NET_RADIO -#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */ +#include <linux/wireless.h> #include <net/iw_handler.h> -#endif /* CONFIG_NET_RADIO */ #include <asm/current.h> /*
@@ -2032,7 +2030,7 @@ .release = seq_release, }; -#ifdef WIRELESS_EXT +#ifdef CONFIG_NET_RADIO extern int wireless_proc_init (void );#else #define wireless_proc_init () 0
@@ -2585,7 +2583,7 @@ ret = -EFAULT ;return ret; } -#ifdef WIRELESS_EXT +#ifdef CONFIG_NET_RADIO /* Take care of Wireless Extensions */ if (cmd >=SIOCIWFIRST && cmd <=SIOCIWLAST ) {/* If command is `set a parameter', or
@@ -2606,7 +2604,7 @@ ret = -EFAULT ; return ret; } -#endif /* WIRELESS_EXT */ +#endif /* CONFIG_NET_RADIO */ return -EINVAL ; } }
net/core/net-sysfs.c renamed from net/core/net-sysfs.c.old +0 -8
@@ -306,7 +306,6 @@ .attrs = netstat_attrs, }; -#ifdef WIRELESS_EXT /* helper function that does all the locking etc for wireless stats */ static ssize_t wireless_show(struct class_device *cd, char *buf, ssize_t (*format)(const struct iw_statistics *,
@@ -366,7 +365,6 @@ .name = "wireless", .attrs = wireless_attrs, }; -#endif #ifdef CONFIG_HOTPLUG static int netdev_uevent(struct class_device *cd, char **envp,
@@ -419,10 +417,8 @@if (net->get_stats)sysfs_remove_group (&class_dev->kobj, &netstat_group); -#ifdef WIRELESS_EXT if (net->get_wireless_stats)sysfs_remove_group (&class_dev->kobj, &wireless_group); -#endif class_device_del (class_dev); }
@@ -452,7 +448,6 @@ (ret = sysfs_create_group(&class_dev->kobj, &netstat_group))) goto out_unreg; -#ifdef WIRELESS_EXT if (net->get_wireless_stats && (ret =sysfs_create_group (&class_dev->kobj, &wireless_group))) goto out_cleanup;
@@ -461,9 +456,6 @@ out_cleanup:if (net->get_stats)sysfs_remove_group (&class_dev->kobj, &netstat_group); -#else -return 0 ; -#endif out_unreg: printk(KERN_WARNING "%s: sysfs attribute registration failed %d\n",
net/socket.c renamed from net/socket.c.old +3 -6
@@ -84,10 +84,7 @@#include <linux/compat.h> #include <linux/kmod.h> #include <linux/audit.h> - -#ifdef CONFIG_NET_RADIO -#include <linux/wireless.h> /* Note : will define WIRELESS_EXT */ -#endif /* CONFIG_NET_RADIO */ +#include <linux/wireless.h> #include <asm/uaccess.h> #include <asm/unistd.h>
@@ -844,11 +841,11 @@if (cmd >=SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE +15 )) { err =dev_ioctl (cmd, argp); } else -#ifdef WIRELESS_EXT +#ifdef CONFIG_NET_RADIO if (cmd >=SIOCIWFIRST && cmd <=SIOCIWLAST ) { err =dev_ioctl (cmd, argp); } else -#endif /* WIRELESS_EXT */ +#endif /* CONFIG_NET_RADIO */ switch (cmd) {case FIOSETOWN :case SIOCSPGRP :