2008-09-12 17:37:28

by Larry Finger

[permalink] [raw]
Subject: The new regulatory code kills my wireless

After pulling the latest git from wireless-testing, my wireless
failed. I bisected this to be commit
544ec9a11fdef5142a76a8eb4b186a80a272c035, "cfg80211: Add new wireless
regulatory infrastructure". I have not yet implemented CRDA, thus I
selected the CONFIG_WIRELESS_OLD_REGULATORY option.

The symptoms are that my devices (b43 and p54usb) receive no scan
information.

The pertinent dmesg output follows:

cfg80211: Using old static regulatory domain:
cfg80211: Regulatory domain: US
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(239200 KHz - 248200 KHz @ 4000 KHz), (600 mBi, 2700 mBm)
(516000 KHz - 520000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
(518000 KHz - 522000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
(520000 KHz - 524000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
(522000 KHz - 534000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
(572500 KHz - 584500 KHz @ 4000 KHz), (600 mBi, 3000 mBm)
cfg80211: Calling CRDA for country: US

Thanks,

Larry


2008-09-13 16:50:39

by Marcel Holtmann

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

Hi Johannes,

> > I am pretty happy that you caught it, because that was my whole point
> > from the discussion we had at OLS. The userspace part might not be in
> > place and we must ensure that everything still works as before :)
>
> I thought your point was that you wanted regulatory_hint_regdom(...)
> that the driver can use to tell us what the EEPROM regulatory is, which
> wouldn't have been affected by this bug :) But anyway, yeah, it's a bug.

of course I want regulatory_hint_regdom :)

I was just trying to make clear how important it is to make sure we work
with a broken userspace or without userspace support at all

Regards

Marcel



2008-09-13 02:25:46

by Marcel Holtmann

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

Hi Johannes,

> > Well no, IMHO people *should not* use the old regulatory stuff if
> > possible, the idea is to kill it ASAP, you should only use the old
> > regulatory stuff if you *need* to, meaning you have some dependency
> > on the old module parameter for some strange odd ball reason or if
> > you cannot compile and install crda or iw.
>
> Well, TBH, I was just too lazy to do that ;)

I am pretty happy that you caught it, because that was my whole point
from the discussion we had at OLS. The userspace part might not be in
place and we must ensure that everything still works as before :)

Regards

Marcel



2008-09-12 20:22:48

by Johannes Berg

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

On Fri, 2008-09-12 at 12:19 -0700, Luis R. Rodriguez wrote:
> Well no, IMHO people *should not* use the old regulatory stuff if
> possible, the idea is to kill it ASAP, you should only use the old
> regulatory stuff if you *need* to, meaning you have some dependency
> on the old module parameter for some strange odd ball reason or if
> you cannot compile and install crda or iw.

Well, TBH, I was just too lazy to do that ;)

johannes


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

2008-09-12 20:59:37

by Larry Finger

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

Luis R. Rodriguez wrote:
>
> Sorry, I forgot to factor in lazy people, that's important. I hope
> there are no lazy distributions.

There may or may not be any of them, but there will be lots of people
that are running kernels later than the standard for their distro - me
as one example. Not all of them will have the skills or inclination to
build CRDA. For them, I expect that the distro kernels will have the
old stuff enabled as long as that option lives.

Note: The prerequisites for building CRDA should include netlink. That
was the last stumbling block for me.

Larry

2008-09-12 18:46:37

by Larry Finger

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

Luis R. Rodriguez wrote:
> On Fri, Sep 12, 2008 at 10:37:26AM -0700, Larry Finger wrote:
>> After pulling the latest git from wireless-testing, my wireless
>> failed. I bisected this to be commit
>> 544ec9a11fdef5142a76a8eb4b186a80a272c035, "cfg80211: Add new wireless
>> regulatory infrastructure".
--snip--
>
> Please apply johill's patch, "[PATCH] cfg80211: fix regdomain macro"

That patch fixed the problem. For someone following this thread, the
patch is by Johannes Berg.

I can understand when some oddball hardware causes a corner-case
problem - I just had one with an ancient laptop - but somehow, I
expect that most people will use the old regulatory option, at least
for a while. Shouldn't the most rudimentary testing have caught this
problem?

Larry

2008-09-12 21:15:28

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

On Fri, Sep 12, 2008 at 01:59:35PM -0700, Larry Finger wrote:
> Luis R. Rodriguez wrote:
> >
> > Sorry, I forgot to factor in lazy people, that's important. I hope
> > there are no lazy distributions.
>
> There may or may not be any of them, but there will be lots of people
> that are running kernels later than the standard for their distro - me
> as one example. Not all of them will have the skills or inclination to
> build CRDA. For them, I expect that the distro kernels will have the
> old stuff enabled as long as that option lives.
>
> Note: The prerequisites for building CRDA should include netlink. That
> was the last stumbling block for me.

Yeah good point.

Luis

2008-09-12 19:19:29

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

On Fri, Sep 12, 2008 at 11:46:36AM -0700, Larry Finger wrote:
> Luis R. Rodriguez wrote:
> > On Fri, Sep 12, 2008 at 10:37:26AM -0700, Larry Finger wrote:
> >> After pulling the latest git from wireless-testing, my wireless
> >> failed. I bisected this to be commit
> >> 544ec9a11fdef5142a76a8eb4b186a80a272c035, "cfg80211: Add new wireless
> >> regulatory infrastructure".
> --snip--
> >
> > Please apply johill's patch, "[PATCH] cfg80211: fix regdomain macro"
>
> That patch fixed the problem. For someone following this thread, the
> patch is by Johannes Berg.
>
> I can understand when some oddball hardware causes a corner-case
> problem - I just had one with an ancient laptop - but somehow, I
> expect that most people will use the old regulatory option, at least
> for a while. Shouldn't the most rudimentary testing have caught this
> problem?

Well no, IMHO people *should not* use the old regulatory stuff if
possible, the idea is to kill it ASAP, you should only use the old
regulatory stuff if you *need* to, meaning you have some dependency
on the old module parameter for some strange odd ball reason or if
you cannot compile and install crda or iw.

But yes, you are right testing should have caught this, and I appologize
for that. Thing is I have crda installed and if you have it you won't
see this issue as this macro is only used for the static regulatory
domains. But yes, I should have caught it.

Luis

2008-09-14 01:28:16

by John W. Linville

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

On Sat, Sep 13, 2008 at 06:51:13PM +0200, Marcel Holtmann wrote:
> Hi Johannes,
>
> > > I am pretty happy that you caught it, because that was my whole point
> > > from the discussion we had at OLS. The userspace part might not be in
> > > place and we must ensure that everything still works as before :)
> >
> > I thought your point was that you wanted regulatory_hint_regdom(...)
> > that the driver can use to tell us what the EEPROM regulatory is, which
> > wouldn't have been affected by this bug :) But anyway, yeah, it's a bug.
>
> of course I want regulatory_hint_regdom :)
>
> I was just trying to make clear how important it is to make sure we work
> with a broken userspace or without userspace support at all

Which is, of course, why I asked Luis to implement the compatibility
option, and why I decided to let it cook for a bit in wireless-testing
before sending it to Dave for net-next-2.6... :-)

John
--
John W. Linville
[email protected]

2008-09-13 09:20:43

by Johannes Berg

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

Hi Marcel,

> I am pretty happy that you caught it, because that was my whole point
> from the discussion we had at OLS. The userspace part might not be in
> place and we must ensure that everything still works as before :)

I thought your point was that you wanted regulatory_hint_regdom(...)
that the driver can use to tell us what the EEPROM regulatory is, which
wouldn't have been affected by this bug :) But anyway, yeah, it's a bug.

johannes


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

2008-09-12 17:40:46

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

On Fri, Sep 12, 2008 at 10:37:26AM -0700, Larry Finger wrote:
> After pulling the latest git from wireless-testing, my wireless
> failed. I bisected this to be commit
> 544ec9a11fdef5142a76a8eb4b186a80a272c035, "cfg80211: Add new wireless
> regulatory infrastructure". I have not yet implemented CRDA, thus I
> selected the CONFIG_WIRELESS_OLD_REGULATORY option.
>
> The symptoms are that my devices (b43 and p54usb) receive no scan
> information.
>
> The pertinent dmesg output follows:
>
> cfg80211: Using old static regulatory domain:
> cfg80211: Regulatory domain: US
> (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
> (239200 KHz - 248200 KHz @ 4000 KHz), (600 mBi, 2700 mBm)
> (516000 KHz - 520000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
> (518000 KHz - 522000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
> (520000 KHz - 524000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
> (522000 KHz - 534000 KHz @ 4000 KHz), (600 mBi, 2300 mBm)
> (572500 KHz - 584500 KHz @ 4000 KHz), (600 mBi, 3000 mBm)
> cfg80211: Calling CRDA for country: US

Please apply johill's patch, "[PATCH] cfg80211: fix regdomain macro"

Luis

2008-09-12 20:34:48

by Luis R. Rodriguez

[permalink] [raw]
Subject: Re: The new regulatory code kills my wireless

On Fri, Sep 12, 2008 at 01:22:38PM -0700, Johannes Berg wrote:
> On Fri, 2008-09-12 at 12:19 -0700, Luis R. Rodriguez wrote:
> > Well no, IMHO people *should not* use the old regulatory stuff if
> > possible, the idea is to kill it ASAP, you should only use the old
> > regulatory stuff if you *need* to, meaning you have some dependency
> > on the old module parameter for some strange odd ball reason or if
> > you cannot compile and install crda or iw.
>
> Well, TBH, I was just too lazy to do that ;)

Sorry, I forgot to factor in lazy people, that's important. I hope
there are no lazy distributions.

Luis