]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
wireless: remove wext sysfs
authorJohannes Berg <johannes.berg@intel.com>
Wed, 16 May 2012 21:40:18 +0000 (23:40 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 5 Jun 2012 19:32:15 +0000 (15:32 -0400)
The only user of this was hal prior to its 0.5.12
release which happened over two years ago, so I'm
sure this can be removed without issues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Documentation/feature-removal-schedule.txt
net/core/net-sysfs.c
net/wireless/Kconfig

index 56000b33340bbe33f0b141934c756470d32ecbbd..0258e3d06280e909a4703128a2c45e45767428f9 100644 (file)
@@ -249,15 +249,6 @@ Who:       Ravikiran Thirumalai <kiran@scalex86.org>
 
 ---------------------------
 
-What:  Code that is now under CONFIG_WIRELESS_EXT_SYSFS
-       (in net/core/net-sysfs.c)
-When:  3.5
-Why:   Over 1K .text/.data size reduction, data is available in other
-       ways (ioctls)
-Who:   Johannes Berg <johannes@sipsolutions.net>
-
----------------------------
-
 What:  sysfs ui for changing p4-clockmod parameters
 When:  September 2009
 Why:   See commits 129f8ae9b1b5be94517da76009ea956e89104ce8 and
index fdf9e61d0651fab74e2836593a872586cd8efec3..72607174ea5a4af158855f588b767b5c4c86d973 100644 (file)
@@ -417,72 +417,6 @@ static struct attribute_group netstat_group = {
        .name  = "statistics",
        .attrs  = netstat_attrs,
 };
-
-#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 *,
-                                              char *))
-{
-       struct net_device *dev = to_net_dev(d);
-       const struct iw_statistics *iw;
-       ssize_t ret = -EINVAL;
-
-       if (!rtnl_trylock())
-               return restart_syscall();
-       if (dev_isalive(dev)) {
-               iw = get_wireless_stats(dev);
-               if (iw)
-                       ret = (*format)(iw, buf);
-       }
-       rtnl_unlock();
-
-       return ret;
-}
-
-/* show function template for wireless fields */
-#define WIRELESS_SHOW(name, field, format_string)                      \
-static ssize_t format_iw_##name(const struct iw_statistics *iw, char *buf) \
-{                                                                      \
-       return sprintf(buf, format_string, iw->field);                  \
-}                                                                      \
-static ssize_t show_iw_##name(struct device *d,                                \
-                             struct device_attribute *attr, char *buf) \
-{                                                                      \
-       return wireless_show(d, buf, format_iw_##name);                 \
-}                                                                      \
-static DEVICE_ATTR(name, S_IRUGO, show_iw_##name, NULL)
-
-WIRELESS_SHOW(status, status, fmt_hex);
-WIRELESS_SHOW(link, qual.qual, fmt_dec);
-WIRELESS_SHOW(level, qual.level, fmt_dec);
-WIRELESS_SHOW(noise, qual.noise, fmt_dec);
-WIRELESS_SHOW(nwid, discard.nwid, fmt_dec);
-WIRELESS_SHOW(crypt, discard.code, fmt_dec);
-WIRELESS_SHOW(fragment, discard.fragment, fmt_dec);
-WIRELESS_SHOW(misc, discard.misc, fmt_dec);
-WIRELESS_SHOW(retries, discard.retries, fmt_dec);
-WIRELESS_SHOW(beacon, miss.beacon, fmt_dec);
-
-static struct attribute *wireless_attrs[] = {
-       &dev_attr_status.attr,
-       &dev_attr_link.attr,
-       &dev_attr_level.attr,
-       &dev_attr_noise.attr,
-       &dev_attr_nwid.attr,
-       &dev_attr_crypt.attr,
-       &dev_attr_fragment.attr,
-       &dev_attr_retries.attr,
-       &dev_attr_misc.attr,
-       &dev_attr_beacon.attr,
-       NULL
-};
-
-static struct attribute_group wireless_group = {
-       .name = "wireless",
-       .attrs = wireless_attrs,
-};
-#endif
 #endif /* CONFIG_SYSFS */
 
 #ifdef CONFIG_RPS
@@ -1463,14 +1397,6 @@ int netdev_register_kobject(struct net_device *net)
                groups++;
 
        *groups++ = &netstat_group;
-#ifdef CONFIG_WIRELESS_EXT_SYSFS
-       if (net->ieee80211_ptr)
-               *groups++ = &wireless_group;
-#ifdef CONFIG_WIRELESS_EXT
-       else if (net->wireless_handlers)
-               *groups++ = &wireless_group;
-#endif
-#endif
 #endif /* CONFIG_SYSFS */
 
        error = device_add(dev);
index 2e4444fedbe0143430fdaffdd58c8793ee6da9de..8dba3c60794a995726e1e754560169d8a92ea6b0 100644 (file)
@@ -119,19 +119,6 @@ config CFG80211_WEXT
          Enable this option if you need old userspace for wireless
          extensions with cfg80211-based drivers.
 
-config WIRELESS_EXT_SYSFS
-       bool "Wireless extensions sysfs files"
-       depends on WEXT_CORE && 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 N. If you know you have ancient tools requiring it,
-         like very old versions of hal (prior to 0.5.12 release),
-         say Y and update the tools as soon as possible as this
-         option will be removed soon.
-
 config LIB80211
        tristate "Common routines for IEEE802.11 drivers"
        default n