2007-03-03 11:18:39

by Johannes Berg

[permalink] [raw]
Subject: question: /sys/class/net/*/wireless

Hi,

It just occurred to me that /sys/class/net/*/wireless/ completely
depends on wireless extensions. Since we're attempting to kill wireless
extensions and hopefully will succeed in doing that some time soon, it
is possible that people will be running with mac80211 drivers w/o
CONFIG_WIRELESS_EXT.

This leaves us in a sticky situation. People with CONFIG_WIRELESS_EXT
will have /sys/class/net/*/wireless/ directories, but people without
won't, and CONFIG_WIRELESS_EXT will not be necessary for a lot of
people.

Thus, I think we'll need to offer a /sys/class/net/*/wireless/ directory
for cfg80211-only systems as well, since that'd also be the only way to
tell if a device is wireless from sysfs. However, I'd much rather have
that dir called ieee80211 in accordance with what we're doing elsewhere.
But pre-802.11 equipment also uses wireless ext. Hmm :)

We could create ieee80211 and create a symlink to it.

Another thing we could do is simply deprecate the wireless directory
there, but then wireless-ext users wouldn't have a way to tell if a
netdev is wireless from sysfs.... Kinda feels like a "caught between a
rock and a hard place" type of situation to me right now but I'm sure
someone can come up with something perfect :P

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-03 11:28:45

by Johannes Berg

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

And related to that issue, /proc/net/wireless.

Seeing that /sys/class/net/*/wireless has been around forever and offers
the same information (actually, /proc/net/wireless tries to post-process
quality values?? we can do that in sysfs too) I opt for killing it to
minimize support requirements for cfg80211.

Unless somebody objects I intend to send a feature removal schedule
patch soon.

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-16 17:07:22

by Johannes Berg

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

On Fri, 2007-03-16 at 15:03 +0100, Jiri Benc wrote:

> > Actually, that was pointless. I should have checked before, but forgot
> > to, /proc/net/wireless lives in wext-common.c now which is compiled
> > whenever you have cfg80211/wext-compat and/or wext configured.
>
> Couldn't /sys/class/net/*/wireless be created by wext-common.c as well?
> (Didn't check, maybe it's not doable.)

Yeah, currently it just lives in some other place, but it could.

> Then we can have /sys/class/net/*/ieee80211 for cfg80211-based
> interfaces.

And /wireless just present for wext? That won't work out properly, but
I'm sure once I actually look at the code I can think of something.

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-16 14:03:54

by Jiri Benc

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

On Sun, 04 Mar 2007 01:21:09 +0100, Johannes Berg wrote:
> On Sat, 2007-03-03 at 12:27 +0100, Johannes Berg wrote:
> > And related to that issue, /proc/net/wireless.
>
> Actually, that was pointless. I should have checked before, but forgot
> to, /proc/net/wireless lives in wext-common.c now which is compiled
> whenever you have cfg80211/wext-compat and/or wext configured.

Couldn't /sys/class/net/*/wireless be created by wext-common.c as well?
(Didn't check, maybe it's not doable.)

Then we can have /sys/class/net/*/ieee80211 for cfg80211-based
interfaces.

Jiri

--
Jiri Benc
SUSE Labs

2007-03-21 14:12:34

by Jiri Benc

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

On Fri, 16 Mar 2007 18:07:12 +0100, Johannes Berg wrote:
> On Fri, 2007-03-16 at 15:03 +0100, Jiri Benc wrote:
> > Then we can have /sys/class/net/*/ieee80211 for cfg80211-based
> > interfaces.
>
> And /wireless just present for wext? That won't work out properly, but
> I'm sure once I actually look at the code I can think of something.

Why it won't work? If you have wext-compat configured, you have the
'wireless' directory (and 'ieee80211' as well). If you don't have
wext-compat, you don't have the 'wireless' directory. But tools which
depend on wext won't work then anyway, so no difference here.

Or am I missing some special cases?

Thanks,

Jiri

--
Jiri Benc
SUSE Labs

2007-03-03 17:40:10

by Jouni Malinen

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

On Sat, Mar 03, 2007 at 12:27:37PM +0100, Johannes Berg wrote:
> And related to that issue, /proc/net/wireless.
>
> Seeing that /sys/class/net/*/wireless has been around forever and offers
> the same information (actually, /proc/net/wireless tries to post-process
> quality values?? we can do that in sysfs too) I opt for killing it to
> minimize support requirements for cfg80211.
>
> Unless somebody objects I intend to send a feature removal schedule
> patch soon.

Well, it could be added to the schedule, but taken into account how
widely used /proc/net/wireless and wireless extensions are in user space
programs, I don't think this should be removed anytime soon, if ever. I
would object removal for at least the next five years..

--
Jouni Malinen PGP id EFC895FA

2007-03-03 19:53:38

by Johannes Berg

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

On Sa, 2007-03-03 at 09:40 -0800, Jouni Malinen wrote:

> Well, it could be added to the schedule, but taken into account how
> widely used /proc/net/wireless and wireless extensions are in user space
> programs, I don't think this should be removed anytime soon, if ever. I
> would object removal for at least the next five years..

Will you write the compat code for cfg80211 for it? :P

johannes


2007-03-04 00:21:36

by Johannes Berg

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

On Sat, 2007-03-03 at 12:27 +0100, Johannes Berg wrote:
> And related to that issue, /proc/net/wireless.

Actually, that was pointless. I should have checked before, but forgot
to, /proc/net/wireless lives in wext-common.c now which is compiled
whenever you have cfg80211/wext-compat and/or wext configured.

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part

2007-03-21 14:18:10

by Johannes Berg

[permalink] [raw]
Subject: Re: question: /sys/class/net/*/wireless

On Wed, 2007-03-21 at 15:12 +0100, Jiri Benc wrote:

> Why it won't work? If you have wext-compat configured, you have the
> 'wireless' directory (and 'ieee80211' as well). If you don't have
> wext-compat, you don't have the 'wireless' directory. But tools which
> depend on wext won't work then anyway, so no difference here.
>
> Or am I missing some special cases?

No, that's all ok, but I don't think people (will) realise that wext has
influence into sysfs. Actually, it isn't created by wext-common but
net/core/net-sysfs.c so we'll have to actually make that create all the
stuff with wext-compat too. Which again sucks but may work out
differently after all if James makes wext-compat use wext.

johannes


Attachments:
signature.asc (190.00 B)
This is a digitally signed message part