wext: make sysfs bits optional and deprecate them
authorJohannes Berg <johannes@sipsolutions.net>
Thu, 10 Jul 2008 09:16:47 +0000 (11:16 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Jul 2008 18:52:57 +0000 (14:52 -0400)
The /sys/class/net/*/wireless/ direcory is, as far as I know, not
used by anyone. Additionally, the same data is available via wext
ioctls. Hence the sysfs files are pretty much useless. This patch
makes them optional and schedules them for removal.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Jean Tourrilhes <jt@hpl.hp.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Documentation/feature-removal-schedule.txt
net/core/net-sysfs.c
net/wireless/Kconfig

index 8319c46..db300e0 100644 (file)
@@ -333,3 +333,13 @@ Why:       This option was introduced just to allow older lm-sensors userspace
        to keep working over the upgrade to 2.6.26. At the scheduled time of
        removal fixed lm-sensors (2.x or 3.x) should be readily available.
 Who:   Rene Herman <rene.herman@gmail.com>
+
+---------------------------
+
+What:  Code that is now under CONFIG_WIRELESS_EXT_SYSFS
+       (in net/core/net-sysfs.c)
+When:  After the only user (hal) has seen a release with the patches
+       for enough time, probably some time in 2010.
+Why:   Over 1K .text/.data size reduction, data is available in other
+       ways (ioctls)
+Who:   Johannes Berg <johannes@sipsolutions.net>
index 3f79413..c1f4e0d 100644 (file)
@@ -318,7 +318,7 @@ static struct attribute_group netstat_group = {
        .attrs  = netstat_attrs,
 };
 
-#ifdef CONFIG_WIRELESS_EXT
+#ifdef CONFIG_WIRELESS_EXT_SYSFS
 /* helper function that does all the locking etc for wireless stats */
 static ssize_t wireless_show(struct device *d, char *buf,
                             ssize_t (*format)(const struct iw_statistics *,
@@ -459,7 +459,7 @@ int netdev_register_kobject(struct net_device *net)
 #ifdef CONFIG_SYSFS
        *groups++ = &netstat_group;
 
-#ifdef CONFIG_WIRELESS_EXT
+#ifdef CONFIG_WIRELESS_EXT_SYSFS
        if (net->wireless_handlers && net->wireless_handlers->get_wireless_stats)
                *groups++ = &wireless_group;
 #endif
index 7927090..ab015c6 100644 (file)
@@ -29,3 +29,14 @@ config WIRELESS_EXT
 
          Say N (if you can) unless you know you need wireless
          extensions for external modules.
+
+config WIRELESS_EXT_SYSFS
+       bool "Wireless extensions sysfs files"
+       default y
+       depends on WIRELESS_EXT && SYSFS
+       help
+         This option enables the deprecated wireless statistics
+         files in /sys/class/net/*/wireless/. The same information
+         is available via the ioctls as well.
+
+         Say Y if you have programs using it (we don't know of any).