On Mon, Dec 05, 2005 at 03:51:36PM -0800, jt wrote:
> Adrian Bunk wrote :
> > 
> > Using WIRELESS_EXT instead of CONFIG_NET_RADIO is simply ugly.
> 
>       You are probably right that something need to be done about
> it, but I believe this is the wrong direction. I would prefer you to
> replace WIRELESS_EXT with CONFIG_WIRELESS_EXT.
>
[...]

        Less talk, more patches. What do you guys think of the
attached patch. Please try it...

        Jean

------------------------------------------------------

diff -u -p linux/drivers/net/wireless/Kconfig-j1 
linux/drivers/net/wireless/Kconfig
--- linux/drivers/net/wireless/Kconfig-j1       2005-12-05 18:14:11.000000000 
-0800
+++ linux/drivers/net/wireless/Kconfig  2005-12-05 18:35:09.000000000 -0800
@@ -6,24 +6,12 @@ menu "Wireless LAN (non-hamradio)"
        depends on NETDEVICES
 
 config NET_RADIO
-       bool "Wireless LAN drivers (non-hamradio) & Wireless Extensions"
+       bool "Wireless LAN drivers (non-hamradio)"
+       select WIRELESS_EXT
        ---help---
          Support for wireless LANs and everything having to do with radio,
          but not with amateur radio or FM broadcasting.
 
-         Saying Y here also enables the Wireless Extensions (creates
-         /proc/net/wireless and enables iwconfig access). The Wireless
-         Extension is a generic API allowing a driver to expose to the user
-         space configuration and statistics specific to common Wireless LANs.
-         The beauty of it is that a single set of tool can support all the
-         variations of Wireless LANs, regardless of their type (as long as
-         the driver supports Wireless Extension). Another advantage is that
-         these parameters may be changed on the fly without restarting the
-         driver (or Linux). If you wish to use Wireless Extensions with
-         wireless PCMCIA (PC-) cards, you need to say Y here; you can fetch
-         the tools from
-         <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
-
          Some user-level drivers for scarab devices which don't require
          special kernel support are available from
          <ftp://shadow.cabi.net/pub/Linux/>.
diff -u -p linux/net/ieee80211/Kconfig-j1 linux/net/ieee80211/Kconfig
--- linux/net/ieee80211/Kconfig-j1      2005-12-05 18:14:05.000000000 -0800
+++ linux/net/ieee80211/Kconfig 2005-12-05 18:36:27.000000000 -0800
@@ -1,5 +1,6 @@
 config IEEE80211
        tristate "Generic IEEE 802.11 Networking Stack"
+       select WIRELESS_EXT
        ---help---
        This option enables the hardware independent IEEE 802.11
        networking stack.
diff -u -p linux/net/Kconfig.j1 linux/net/Kconfig
--- linux/net/Kconfig.j1        2005-12-05 18:35:54.000000000 -0800
+++ linux/net/Kconfig   2005-12-05 18:36:16.000000000 -0800
@@ -214,6 +214,24 @@ endmenu
 source "net/ax25/Kconfig"
 source "net/irda/Kconfig"
 source "net/bluetooth/Kconfig"
+
+config WIRELESS_EXT
+       bool "Wireless Extensions API (802.11 and more)"
+       ---help---
+         Saying Y here enables the Wireless Extensions (creates
+         /proc/net/wireless and enables iwconfig access). The Wireless
+         Extension is a generic API allowing a driver to expose to the user
+         space configuration and statistics specific to common Wireless LANs.
+         The beauty of it is that a single set of tool can support all the
+         variations of Wireless LANs, regardless of their type (as long as
+         the driver supports Wireless Extension). Another advantage is that
+         these parameters may be changed on the fly without restarting the
+         driver (or Linux).
+         If you wish to use Wireless Extensions with wireless cards or with
+         the Generic IEEE 802.11 Networking Stack, you need to say Y here;
+         you can fetch the tools from
+         <http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html>.
+
 source "net/ieee80211/Kconfig"
 
 endif   # if NET
diff -u -p linux/drivers/net/wireless/wavelan_cs.p.j1.h 
linux/drivers/net/wireless/wavelan_cs.p.h
--- linux/drivers/net/wireless/wavelan_cs.p.j1.h        2005-12-05 
18:20:45.000000000 -0800
+++ linux/drivers/net/wireless/wavelan_cs.p.h   2005-12-05 18:21:22.000000000 
-0800
@@ -99,7 +99,7 @@
  * caracteristics of the hardware in a standard way and support for
  * applications for taking advantage of it (like Mobile IP).
  *
- * You will need to enable the CONFIG_NET_RADIO define in the kernel
+ * You will need to enable the CONFIG_WIRELESS_EXT define in the kernel
  * configuration to enable the wireless extensions (this is the one
  * giving access to the radio network device choice).
  *
@@ -441,7 +441,7 @@
 #include <linux/fcntl.h>
 #include <linux/ethtool.h>
 
-#ifdef CONFIG_NET_RADIO
+#ifdef CONFIG_WIRELESS_EXT
 #include <linux/wireless.h>            /* Wireless extensions */
 #include <net/iw_handler.h>            /* New driver API */
 #endif
diff -u -p linux/drivers/net/wireless/netwave_cs.j1.c 
linux/drivers/net/wireless/netwave_cs.c
--- linux/drivers/net/wireless/netwave_cs.j1.c  2005-12-05 18:22:23.000000000 
-0800
+++ linux/drivers/net/wireless/netwave_cs.c     2005-12-05 18:22:40.000000000 
-0800
@@ -55,7 +55,7 @@
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/bitops.h>
-#ifdef CONFIG_NET_RADIO
+#ifdef CONFIG_WIRELESS_EXT
 #include <linux/wireless.h>
 #include <net/iw_handler.h>
 #endif
diff -u -p linux/net/core/dev.j1.c linux/net/core/dev.c
--- linux/net/core/dev.j1.c     2005-12-05 18:26:12.000000000 -0800
+++ linux/net/core/dev.c        2005-12-05 18:24:59.000000000 -0800
@@ -109,10 +109,10 @@
 #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 */
+#ifdef CONFIG_WIRELESS_EXT
+#include <linux/wireless.h>
 #include <net/iw_handler.h>
-#endif /* CONFIG_NET_RADIO */
+#endif /* CONFIG_WIRELESS_EXT */
 #include <asm/current.h>
 
 /*
@@ -2029,7 +2029,7 @@ static struct file_operations softnet_se
        .release = seq_release,
 };
 
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_WIRELESS_EXT
 extern int wireless_proc_init(void);
 #else
 #define wireless_proc_init() 0
@@ -2582,7 +2582,7 @@ int dev_ioctl(unsigned int cmd, void __u
                                        ret = -EFAULT;
                                return ret;
                        }
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_WIRELESS_EXT
                        /* Take care of Wireless Extensions */
                        if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
                                /* If command is `set a parameter', or
@@ -2603,7 +2603,7 @@ int dev_ioctl(unsigned int cmd, void __u
                                        ret = -EFAULT;
                                return ret;
                        }
-#endif /* WIRELESS_EXT */
+#endif /* CONFIG_WIRELESS_EXT */
                        return -EINVAL;
        }
 }
diff -u -p linux/net/core/Makefile.j1 linux/net/core/Makefile
--- linux/net/core/Makefile.j1  2005-12-05 18:26:02.000000000 -0800
+++ linux/net/core/Makefile     2005-12-05 18:25:27.000000000 -0800
@@ -14,5 +14,5 @@ obj-$(CONFIG_XFRM) += flow.o
 obj-$(CONFIG_SYSFS) += net-sysfs.o
 obj-$(CONFIG_NET_DIVERT) += dv.o
 obj-$(CONFIG_NET_PKTGEN) += pktgen.o
-obj-$(CONFIG_NET_RADIO) += wireless.o
+obj-$(CONFIG_WIRELESS_EXT) += wireless.o
 obj-$(CONFIG_NETPOLL) += netpoll.o
diff -u -p linux/net/socket.j1.c linux/net/socket.c
--- linux/net/socket.j1.c       2005-12-05 18:26:31.000000000 -0800
+++ linux/net/socket.c  2005-12-05 18:27:10.000000000 -0800
@@ -85,9 +85,9 @@
 #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 */
+#ifdef CONFIG_WIRELESS_EXT
+#include <linux/wireless.h>
+#endif /* CONFIG_WIRELESS_EXT */
 
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
@@ -844,11 +844,11 @@ static long sock_ioctl(struct file *file
        if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) {
                err = dev_ioctl(cmd, argp);
        } else
-#ifdef WIRELESS_EXT
+#ifdef CONFIG_WIRELESS_EXT
        if (cmd >= SIOCIWFIRST && cmd <= SIOCIWLAST) {
                err = dev_ioctl(cmd, argp);
        } else
-#endif /* WIRELESS_EXT */
+#endif /* CONFIG_WIRELESS_EXT */
        switch (cmd) {
                case FIOSETOWN:
                case SIOCSPGRP:
diff -u -p linux/net/ieee80211/ieee80211_rx.j1.c 
linux/net/ieee80211/ieee80211_rx.c
--- linux/net/ieee80211/ieee80211_rx.j1.c       2005-12-05 18:27:40.000000000 
-0800
+++ linux/net/ieee80211/ieee80211_rx.c  2005-12-05 18:28:21.000000000 -0800
@@ -368,8 +368,8 @@ int ieee80211_rx(struct ieee80211_device
 
        /* Put this code here so that we avoid duplicating it in all
         * Rx paths. - Jean II */
+#ifdef CONFIG_WIRELESS_EXT
 #ifdef IW_WIRELESS_SPY         /* defined in iw_handler.h */
-#ifdef CONFIG_NET_RADIO
        /* If spy monitoring on */
        if (ieee->spy_data.spy_number > 0) {
                struct iw_quality wstats;
@@ -396,8 +396,8 @@ int ieee80211_rx(struct ieee80211_device
                /* Update spy records */
                wireless_spy_update(ieee->dev, hdr->addr2, &wstats);
        }
-#endif                         /* CONFIG_NET_RADIO */
 #endif                         /* IW_WIRELESS_SPY */
+#endif                         /* CONFIG_WIRELESS_EXT */
 
 #ifdef NOT_YET
        hostap_update_rx_stats(local->ap, hdr, rx_stats);

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to