public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: netdev <netdev@vger.kernel.org>
Cc: Jean Tourrilhes <jt@hpl.hp.com>,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [RFC] make wext wireless bits optional and deprecate them
Date: Sat, 17 May 2008 14:12:17 +0200	[thread overview]
Message-ID: <1211026337.3827.25.camel@johannes.berg> (raw)

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>
---
 Documentation/feature-removal-schedule.txt |    8 ++++++++
 net/core/net-sysfs.c                       |    4 ++--
 net/wireless/Kconfig                       |   11 +++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

--- everything.orig/net/core/net-sysfs.c	2008-05-17 13:22:21.000000000 +0200
+++ everything/net/core/net-sysfs.c	2008-05-17 13:23:43.000000000 +0200
@@ -318,7 +318,7 @@ static struct attribute_group netstat_gr
 	.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 *,
@@ -460,7 +460,7 @@ int netdev_register_kobject(struct net_d
 	if (net->get_stats)
 		*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
--- everything.orig/net/wireless/Kconfig	2008-05-17 13:22:21.000000000 +0200
+++ everything/net/wireless/Kconfig	2008-05-17 14:09:01.000000000 +0200
@@ -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).
--- everything.orig/Documentation/feature-removal-schedule.txt	2008-05-17 13:22:20.000000000 +0200
+++ everything/Documentation/feature-removal-schedule.txt	2008-05-17 14:08:37.000000000 +0200
@@ -304,3 +304,11 @@ When:	2.6.26
 Why:	Implementation became generic; users should now include
 	linux/semaphore.h instead.
 Who:	Matthew Wilcox <willy@linux.intel.com>
+
+---------------------------
+
+What:	Code that is now under CONFIG_WIRELESS_EXT_SYSFS
+	(in net/core/net-sysfs.c)
+When:	June 2009
+Why:	Not used by anyone, over 1K .text/.data size reduction.
+Who:	Johannes Berg <johannes@sipsolutions.net>



             reply	other threads:[~2008-05-17 12:12 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-17 12:12 Johannes Berg [this message]
2008-05-17 12:16 ` [RFC] make wext wireless bits optional and deprecate them Johannes Berg
2008-05-17 13:45 ` Marcel Holtmann
2008-05-17 13:54   ` Johannes Berg
2008-05-17 14:36     ` Marcel Holtmann
2008-05-17 14:42       ` Johannes Berg
2008-05-18 13:36     ` Dan Williams
2008-05-19 12:16       ` Johannes Berg
2008-05-19 15:24         ` Dan Williams
2008-05-19 15:39           ` Johannes Berg
2008-05-19 15:53             ` Dan Williams
2008-05-19 17:03           ` Jean Tourrilhes
2008-05-19 17:01         ` Jean Tourrilhes
2008-05-20 17:15   ` Johannes Berg
2008-05-20 17:28     ` Marcel Holtmann
2008-05-21 21:03     ` John W. Linville
2008-05-21 21:37       ` Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1211026337.3827.25.camel@johannes.berg \
    --to=johannes@sipsolutions.net \
    --cc=jt@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox