Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Dave Airlie <airlied@gmail.com>,
	John Linville <linville@tuxdriver.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Bill Nottingham <notting@redhat.com>,
	linux-wireless@vger.kernel.org
Subject: Re: removal of sysfs wext extension broke on F16
Date: Fri, 16 Nov 2012 21:35:37 +0100	[thread overview]
Message-ID: <1353098137.9490.20.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <CA+55aFw8Rx6TScXV_nsh4EFeCDTxsjn9mJPqo8VzPhbG9jC5Fw@mail.gmail.com> (sfid-20121116_192027_176167_6DFB40B3)

On Fri, 2012-11-16 at 10:20 -0800, Linus Torvalds wrote:
> On Tue, Nov 13, 2012 at 12:27 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> >
> > Should I revert it and send it in my next pull request?
> 
> Please do. Or perhaps we could just add the directory back, without
> the actual entries, if that is sufficient..

Yeah, that does seem to be sufficient, I'll queue up the patch below.

johannes


>From 8d6422678975e8128904a5a7a9ba02e94ccc1130 Mon Sep 17 00:00:00 2001
From: Johannes Berg <johannes.berg@intel.com>
Date: Fri, 16 Nov 2012 20:46:19 +0100
Subject: [PATCH] wireless: add back sysfs directory

commit 35b2a113cb0298d4f9a1263338b456094a414057 broke (at least)
Fedora's networking scripts, they check for the existence of the
wireless directory. As the files aren't used, add the directory
back and not the files. Also do it for both drivers based on the
old wireless extensions and cfg80211, regardless of whether the
compat code for wext is built into cfg80211 or not.

Cc: stable@vger.kernel.org [3.6]
Reported-by: Dave Airlie <airlied@gmail.com>
Reported-by: Bill Nottingham <notting@redhat.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/core/net-sysfs.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index bcf02f6..4ce301a 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -429,6 +429,12 @@ static struct attribute_group netstat_group = {
 	.name  = "statistics",
 	.attrs  = netstat_attrs,
 };
+
+#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211)
+static struct attribute_group wireless_group = {
+	.name = "wireless",
+};
+#endif
 #endif /* CONFIG_SYSFS */
 
 #ifdef CONFIG_RPS
@@ -1409,6 +1415,15 @@ int netdev_register_kobject(struct net_device *net)
 		groups++;
 
 	*groups++ = &netstat_group;
+
+#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211)
+	if (net->ieee80211_ptr)
+		*groups++ = &wireless_group;
+#if IS_ENABLED(CONFIG_WIRELESS_EXT)
+	else if (net->wireless_handlers)
+		*groups++ = &wireless_group;
+#endif
+#endif
 #endif /* CONFIG_SYSFS */
 
 	error = device_add(dev);
-- 
1.8.0




       reply	other threads:[~2012-11-16 20:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPM=9twSHBet=vDY9q4BXKv7ZUPR-eme75tOzxrWf6Bsp4MMkw@mail.gmail.com>
     [not found] ` <1352795227.9466.8.camel@jlt4.sipsolutions.net>
     [not found]   ` <CA+55aFw8Rx6TScXV_nsh4EFeCDTxsjn9mJPqo8VzPhbG9jC5Fw@mail.gmail.com>
2012-11-16 20:35     ` Johannes Berg [this message]
2012-11-16 20:36       ` removal of sysfs wext extension broke on F16 Johannes Berg
2012-11-16 20:39         ` Johannes Berg
2012-11-16 22:32           ` Sven-Haegar Koch
2012-11-17 10:32             ` Julian Calaby

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=1353098137.9490.20.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=airlied@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=notting@redhat.com \
    --cc=torvalds@linux-foundation.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