* removal of sysfs wext extension broke on F16 @ 2012-11-12 21:52 Dave Airlie 2012-11-13 8:27 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Dave Airlie @ 2012-11-12 21:52 UTC (permalink / raw) To: johannes.berg, John Linville, LKML, Linus Torvalds https://bugzilla.redhat.com/show_bug.cgi?id=875328 blamed for breaking wireless. https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=35b2a113cb0298d4f9a1263338b456094a414057 apparantly the initscripts used the sysfs directory existance as a check, so maybe either back this out or bring back just the subdirs. Dave. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: removal of sysfs wext extension broke on F16 2012-11-12 21:52 removal of sysfs wext extension broke on F16 Dave Airlie @ 2012-11-13 8:27 ` Johannes Berg 2012-11-16 18:20 ` Linus Torvalds 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-11-13 8:27 UTC (permalink / raw) To: Dave Airlie; +Cc: John Linville, LKML, Linus Torvalds On Tue, 2012-11-13 at 07:52 +1000, Dave Airlie wrote: > https://bugzilla.redhat.com/show_bug.cgi?id=875328 > > blamed for breaking wireless. > https://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=35b2a113cb0298d4f9a1263338b456094a414057 > > apparantly the initscripts used the sysfs directory existance as a > check, so maybe either back this out or bring back just the subdirs. OK. I really thought nobody was using it, but we can of course revert it for Fedora's benefit, it's optional anyway. FWIW, for most drivers you could check if the sys/class/net/$1/phy80211 symlink exists, but that doesn't work for older wext-only drivers (or say the crap Broadcom binary STA driver.) Should I revert it and send it in my next pull request? johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: removal of sysfs wext extension broke on F16 2012-11-13 8:27 ` Johannes Berg @ 2012-11-16 18:20 ` Linus Torvalds 2012-11-16 20:35 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Linus Torvalds @ 2012-11-16 18:20 UTC (permalink / raw) To: Johannes Berg; +Cc: Dave Airlie, John Linville, LKML 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.. Linus ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: removal of sysfs wext extension broke on F16 2012-11-16 18:20 ` Linus Torvalds @ 2012-11-16 20:35 ` Johannes Berg 2012-11-16 20:36 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-11-16 20:35 UTC (permalink / raw) To: Linus Torvalds Cc: Dave Airlie, John Linville, LKML, Bill Nottingham, linux-wireless 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: removal of sysfs wext extension broke on F16 2012-11-16 20:35 ` Johannes Berg @ 2012-11-16 20:36 ` Johannes Berg 2012-11-16 20:39 ` Johannes Berg 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-11-16 20:36 UTC (permalink / raw) To: Linus Torvalds Cc: Dave Airlie, John Linville, LKML, Bill Nottingham, linux-wireless On Fri, 2012-11-16 at 21:35 +0100, Johannes Berg wrote: > 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. Err, no, wishful thinking. I need a *little* bit more for sysfs to work. johannes ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: removal of sysfs wext extension broke on F16 2012-11-16 20:36 ` Johannes Berg @ 2012-11-16 20:39 ` Johannes Berg 2012-11-16 22:32 ` Sven-Haegar Koch 0 siblings, 1 reply; 8+ messages in thread From: Johannes Berg @ 2012-11-16 20:39 UTC (permalink / raw) To: Linus Torvalds Cc: Dave Airlie, John Linville, LKML, Bill Nottingham, linux-wireless On Fri, 2012-11-16 at 21:36 +0100, Johannes Berg wrote: > On Fri, 2012-11-16 at 21:35 +0100, Johannes Berg wrote: > > 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. > > Err, no, wishful thinking. I need a *little* bit more for sysfs to work. This works, sorry about that. >From 38c1a01cf10c6e4049b4ffbd4a6af655df2a46e1 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 | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index bcf02f6..017a8ba 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -429,6 +429,17 @@ static struct attribute_group netstat_group = { .name = "statistics", .attrs = netstat_attrs, }; + +#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) +static struct attribute *wireless_attrs[] = { + NULL +}; + +static struct attribute_group wireless_group = { + .name = "wireless", + .attrs = wireless_attrs, +}; +#endif #endif /* CONFIG_SYSFS */ #ifdef CONFIG_RPS @@ -1409,6 +1420,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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: removal of sysfs wext extension broke on F16 2012-11-16 20:39 ` Johannes Berg @ 2012-11-16 22:32 ` Sven-Haegar Koch 2012-11-17 10:32 ` Julian Calaby 0 siblings, 1 reply; 8+ messages in thread From: Sven-Haegar Koch @ 2012-11-16 22:32 UTC (permalink / raw) To: Johannes Berg Cc: Linus Torvalds, Dave Airlie, John Linville, LKML, Bill Nottingham, linux-wireless On Fri, 16 Nov 2012, Johannes Berg wrote: > On Fri, 2012-11-16 at 21:36 +0100, Johannes Berg wrote: > > On Fri, 2012-11-16 at 21:35 +0100, Johannes Berg wrote: > > > 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. > > > > Err, no, wishful thinking. I need a *little* bit more for sysfs to work. > > This works, sorry about that. > +#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) > +static struct attribute *wireless_attrs[] = { > + NULL > +}; > + > +static struct attribute_group wireless_group = { > + .name = "wireless", > + .attrs = wireless_attrs, > +}; > +#endif > #endif /* CONFIG_SYSFS */ > How about a small comment in the source why it is there? I suppose otherwise in a year or two someone will find it, see "WTF? Useless empty directory?" and try to remove it again... c'ya sven-haegar -- Three may keep a secret, if two of them are dead. - Ben F. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: removal of sysfs wext extension broke on F16 2012-11-16 22:32 ` Sven-Haegar Koch @ 2012-11-17 10:32 ` Julian Calaby 0 siblings, 0 replies; 8+ messages in thread From: Julian Calaby @ 2012-11-17 10:32 UTC (permalink / raw) To: Sven-Haegar Koch Cc: Johannes Berg, Linus Torvalds, Dave Airlie, John Linville, LKML, Bill Nottingham, linux-wireless Hi Sven, On Sat, Nov 17, 2012 at 9:32 AM, Sven-Haegar Koch <haegar@sdinet.de> wrote: > On Fri, 16 Nov 2012, Johannes Berg wrote: > >> On Fri, 2012-11-16 at 21:36 +0100, Johannes Berg wrote: >> > On Fri, 2012-11-16 at 21:35 +0100, Johannes Berg wrote: >> > > 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. >> > >> > Err, no, wishful thinking. I need a *little* bit more for sysfs to work. >> >> This works, sorry about that. > >> +#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) >> +static struct attribute *wireless_attrs[] = { >> + NULL >> +}; >> + >> +static struct attribute_group wireless_group = { >> + .name = "wireless", >> + .attrs = wireless_attrs, >> +}; >> +#endif >> #endif /* CONFIG_SYSFS */ >> > > How about a small comment in the source why it is there? I suppose > otherwise in a year or two someone will find it, see "WTF? Useless > empty directory?" and try to remove it again... Hopefully by then Fedora's networking scripts won't need it =) Thanks, -- Julian Calaby Email: julian.calaby@gmail.com Profile: http://www.google.com/profiles/julian.calaby/ .Plan: http://sites.google.com/site/juliancalaby/ ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-11-17 10:33 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2012-11-12 21:52 removal of sysfs wext extension broke on F16 Dave Airlie 2012-11-13 8:27 ` Johannes Berg 2012-11-16 18:20 ` Linus Torvalds 2012-11-16 20:35 ` Johannes Berg 2012-11-16 20:36 ` Johannes Berg 2012-11-16 20:39 ` Johannes Berg 2012-11-16 22:32 ` Sven-Haegar Koch 2012-11-17 10:32 ` Julian Calaby
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome