Skip to contentSkip to conversation

The new regulatory code kills my wireless

DISCUSSION Larry Finger 5 participants 12 messages Sep 12, 2008 – Sep 14, 2008

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 13 lines · Larry Finger

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

Quoted 8 lines
         (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

#2 lore raw
Quoted 5 lines · Luis R. Rodriguez
Quoted 4 lines · Larry Finger

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--

Quoted 2 lines

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

#3 lore raw
Quoted 10 lines · Larry Finger
Quoted 5 lines · Luis R. Rodriguez
Quoted 4 lines · Larry Finger

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--

Quoted 2 lines

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

Quoted 8 lines

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

#4 lore raw
Quoted 5 lines · Luis R. Rodriguez

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

#5 lore raw
Quoted 8 lines · Johannes Berg
Quoted 5 lines · Luis R. Rodriguez

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

#6 lore raw
Quoted 3 lines · Luis R. Rodriguez

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

#7 lore raw
Quoted 5 lines · Larry Finger
Quoted 3 lines · Luis R. Rodriguez

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

Quoted 8 lines

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

#8 lore raw
In reply to Johannes Berg

Hi Johannes,

Quoted 7 lines
Quoted 5 lines

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

#9 lore raw

Hi Marcel,

Quoted 3 lines

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

#10 lore raw

Hi Johannes,

Quoted 7 lines
Quoted 3 lines

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

#11 lore raw
Quoted 6 lines · Marcel Holtmann

Hi Johannes,

Quoted 4 lines
Quoted 3 lines

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 :)

Quoted 8 lines
Quoted 3 lines

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

Signature · 2 lines
John W. Linville
[email protected]