On Fri, Jan 20, 2006 at 09:58:53AM -0800, Jean Tourrilhes wrote:
> 
>       I remembert that Adrian had some comments on the fact that
> CONFIG_WIRELESS_EXT was a 'visible' option, and wanted it to be
> invisible. I told him to go ahead with the patch, so you may want to
> ask him for all the details.
>...

Sorry, my bad.
This got somehow stuck on my TODO list.

Below is a version of your patch with my points addressed.

cu
Adrian


<--  snip  -->


This patch contains the following changes:
- add a CONFIG_WIRELESS_EXT select'ed by NET_RADIO for conditional
  code
- remove the now no longer required #ifdef CONFIG_NET_RADIO from some
  #include's

Based on a patch by Jean Tourrilhes <[EMAIL PROTECTED]>.


Signed-off-by: Adrian Bunk <[EMAIL PROTECTED]>

---

 drivers/net/wireless/Kconfig        |    3 ++-
 drivers/net/wireless/netwave_cs.c   |    2 --
 drivers/net/wireless/wavelan.p.h    |    6 +-----
 drivers/net/wireless/wavelan_cs.p.h |    9 +--------
 net/Kconfig                         |    3 +++
 net/core/Makefile                   |    2 +-
 net/core/dev.c                      |   10 ++++------
 net/ieee80211/ieee80211_rx.c        |    4 ++--
 net/socket.c                        |    9 +++------
 9 files changed, 17 insertions(+), 31 deletions(-)

--- linux-2.6.16-rc1-mm2-full/drivers/net/wireless/Kconfig.old  2006-01-20 
22:44:45.000000000 +0100
+++ linux-2.6.16-rc1-mm2-full/drivers/net/wireless/Kconfig      2006-01-20 
23:11:19.000000000 +0100
@@ -6,7 +6,8 @@
        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.
--- linux-2.6.16-rc1-mm2-full/net/Kconfig.old   2006-01-20 22:46:09.000000000 
+0100
+++ linux-2.6.16-rc1-mm2-full/net/Kconfig       2006-01-20 22:47:29.000000000 
+0100
@@ -217,6 +217,9 @@
 source "net/bluetooth/Kconfig"
 source "net/ieee80211/Kconfig"
 
+config WIRELESS_EXT
+       bool
+
 endif   # if NET
 endmenu # Networking
 
--- linux-2.6.16-rc1-mm2-full/drivers/net/wireless/wavelan.p.h.old      
2006-01-20 22:55:38.000000000 +0100
+++ linux-2.6.16-rc1-mm2-full/drivers/net/wireless/wavelan.p.h  2006-01-20 
22:55:56.000000000 +0100
@@ -98,11 +98,7 @@
  * characteristics of the hardware.  Applications such as mobile IP may
  * take advantage of it.
  *
- * You will need to enable the CONFIG_NET_RADIO define in the kernel
- * configuration to enable the wireless extensions (this is the one
- * giving access to the radio network device choice).
- *
- * It might also be a good idea as well to fetch the wireless tools to
+ * It might be a good idea as well to fetch the wireless tools to
  * configure the device and play a bit.
  */
 
--- linux-2.6.16-rc1-mm2-full/drivers/net/wireless/wavelan_cs.p.h.old   
2006-01-20 22:47:34.000000000 +0100
+++ linux-2.6.16-rc1-mm2-full/drivers/net/wireless/wavelan_cs.p.h       
2006-01-20 22:48:11.000000000 +0100
@@ -99,11 +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
- * configuration to enable the wireless extensions (this is the one
- * giving access to the radio network device choice).
- *
- * It might also be a good idea as well to fetch the wireless tools to
+ * It might be a good idea as well to fetch the wireless tools to
  * configure the device and play a bit.
  */
 
@@ -440,11 +436,8 @@
 #include <linux/ioport.h>
 #include <linux/fcntl.h>
 #include <linux/ethtool.h>
-
-#ifdef CONFIG_NET_RADIO
 #include <linux/wireless.h>            /* Wireless extensions */
 #include <net/iw_handler.h>            /* New driver API */
-#endif
 
 /* Pcmcia headers that we need */
 #include <pcmcia/cs_types.h>
--- linux-2.6.16-rc1-mm2-full/drivers/net/wireless/netwave_cs.c.old     
2006-01-20 22:48:26.000000000 +0100
+++ linux-2.6.16-rc1-mm2-full/drivers/net/wireless/netwave_cs.c 2006-01-20 
22:48:33.000000000 +0100
@@ -55,10 +55,8 @@
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/bitops.h>
-#ifdef CONFIG_NET_RADIO
 #include <linux/wireless.h>
 #include <net/iw_handler.h>
-#endif
 
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
--- linux-2.6.16-rc1-mm2-full/net/core/dev.c.old        2006-01-20 
22:49:20.000000000 +0100
+++ linux-2.6.16-rc1-mm2-full/net/core/dev.c    2006-01-20 22:50:10.000000000 
+0100
@@ -111,10 +111,8 @@
 #include <linux/rcupdate.h>
 #include <linux/delay.h>
 #include <linux/mutex.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_WIRELESS_EXT
 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_WIRELESS_EXT
                        /* 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_WIRELESS_EXT */
                        return -EINVAL;
        }
 }
--- linux-2.6.16-rc1-mm2-full/net/core/Makefile.old     2006-01-20 
22:50:37.000000000 +0100
+++ linux-2.6.16-rc1-mm2-full/net/core/Makefile 2006-01-20 22:50:54.000000000 
+0100
@@ -14,5 +14,5 @@
 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
--- linux-2.6.16-rc1-mm2-full/net/socket.c.old  2006-01-20 22:51:09.000000000 
+0100
+++ linux-2.6.16-rc1-mm2-full/net/socket.c      2006-01-20 22:51:59.000000000 
+0100
@@ -85,10 +85,7 @@
 #include <linux/kmod.h>
 #include <linux/audit.h>
 #include <linux/mutex.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>
@@ -841,11 +838,11 @@
        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:
--- linux-2.6.16-rc1-mm2-full/net/ieee80211/ieee80211_rx.c.old  2006-01-20 
22:52:23.000000000 +0100
+++ linux-2.6.16-rc1-mm2-full/net/ieee80211/ieee80211_rx.c      2006-01-20 
22:53:01.000000000 +0100
@@ -368,8 +368,8 @@
 
        /* 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 @@
                /* 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