diff mbox

wireless: fix regression caused by regulatory config option

Message ID 20081026103024.2712ddc9@infradead.org
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Arjan van de Ven Oct. 26, 2008, 5:30 p.m. UTC
From 9095a0f6005a8f50c79e51f4aaceda95e361a891 Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <arjan@linux.intel.com>
Date: Sun, 26 Oct 2008 10:25:30 -0700
Subject: [PATCH] wireless: fix regression caused by regulatory config option

The default for the regulatory compatibility option is wrong;
if you picked the default you ended up with a non-functional wifi
system (at least I did on Fedora 9 with iwl4965).
I don't think even the October 2008 releases of the various distros
has the new userland so clearly the default is wrong, and also
we can't just go about deleting this in 2.6.29...

Change the default to "y" and also adjust the config text a little to
reflect this.

This patch fixes regression #11859

With thanks to Johannes Berg for the diagnostics

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 net/wireless/Kconfig |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

Comments

John W. Linville Oct. 26, 2008, 8:09 p.m. UTC | #1
On Sun, Oct 26, 2008 at 10:30:24AM -0700, Arjan van de Ven wrote:
> From 9095a0f6005a8f50c79e51f4aaceda95e361a891 Mon Sep 17 00:00:00 2001
> From: Arjan van de Ven <arjan@linux.intel.com>
> Date: Sun, 26 Oct 2008 10:25:30 -0700
> Subject: [PATCH] wireless: fix regression caused by regulatory config option
> 
> The default for the regulatory compatibility option is wrong;
> if you picked the default you ended up with a non-functional wifi
> system (at least I did on Fedora 9 with iwl4965).
> I don't think even the October 2008 releases of the various distros
> has the new userland so clearly the default is wrong, and also
> we can't just go about deleting this in 2.6.29...
> 
> Change the default to "y" and also adjust the config text a little to
> reflect this.

Is it common practice to have compatibility options default to
"y"?  I'm not saying it shouldn't be, just wondering if it has been
traditionally?

John
Linus Torvalds Oct. 26, 2008, 8:16 p.m. UTC | #2
On Sun, 26 Oct 2008, John W. Linville wrote:
> 
> Is it common practice to have compatibility options default to
> "y"?  I'm not saying it shouldn't be, just wondering if it has been
> traditionally?

Yes. Generally the rule should be that

	make oldconfig

with 'default values for all new options' should give you a configuration 
that is essentially identical to the old one.

So if it's a config option to enable compatibility with old kernels, it 
should default to 'y'. If it's a new driver or a new feature that didn't 
exist in previous kernels, it should default to 'n'.

			Linus
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arjan van de Ven Oct. 26, 2008, 8:18 p.m. UTC | #3
On Sun, 26 Oct 2008 16:09:39 -0400
"John W. Linville" <linville@tuxdriver.com> wrote:
f
> > Change the default to "y" and also adjust the config text a little
> > to reflect this.
> 
> Is it common practice to have compatibility options default to
> "y"?  I'm not saying it shouldn't be, just wondering if it has been
> traditionally?

yes

default should be "keep working as before"

it's not always nice, especially if you're trying to get rid of some
nasty stuff, but think of it this way: you should be able to use a
new kernel on an existing distro, at least for a reasonable type of
distro (eg something shipped in, say, the last 2 years). In this case:
even Fedora 10 is not likely to work!
Johannes Berg Oct. 26, 2008, 8:22 p.m. UTC | #4
On Sun, 2008-10-26 at 13:18 -0700, Arjan van de Ven wrote:

> > Is it common practice to have compatibility options default to
> > "y"?  I'm not saying it shouldn't be, just wondering if it has been
> > traditionally?
> 
> yes
> 
> default should be "keep working as before"
> 
> it's not always nice, especially if you're trying to get rid of some
> nasty stuff, but think of it this way: you should be able to use a
> new kernel on an existing distro, at least for a reasonable type of
> distro (eg something shipped in, say, the last 2 years). In this case:
> even Fedora 10 is not likely to work!

Well, actually, it _ought_ to work fine, with a smaller set of channels,
but you seem to be hit an iwlwifi bug that triggers only with this,
which is rather odd.

johannes
John W. Linville Oct. 26, 2008, 8:44 p.m. UTC | #5
On Sun, Oct 26, 2008 at 01:18:18PM -0700, Arjan van de Ven wrote:
> On Sun, 26 Oct 2008 16:09:39 -0400
> "John W. Linville" <linville@tuxdriver.com> wrote:
> f
> > > Change the default to "y" and also adjust the config text a little
> > > to reflect this.
> > 
> > Is it common practice to have compatibility options default to
> > "y"?  I'm not saying it shouldn't be, just wondering if it has been
> > traditionally?
> 
> yes
> 
> default should be "keep working as before"
> 
> it's not always nice, especially if you're trying to get rid of some
> nasty stuff, but think of it this way: you should be able to use a
> new kernel on an existing distro, at least for a reasonable type of
> distro (eg something shipped in, say, the last 2 years). In this case:
> even Fedora 10 is not likely to work!

Well, I intended to make sure the Fedora guys picked the right option. :-)

Anyway, I'm fine with default 'y'...however, Luis is probably somewhere
buying a gun and looking-up your home address...just kidding...mostly... :-)

John
Marcel Holtmann Oct. 26, 2008, 10:12 p.m. UTC | #6
Hi Arjan,

> > > Change the default to "y" and also adjust the config text a little
> > > to reflect this.
> > 
> > Is it common practice to have compatibility options default to
> > "y"?  I'm not saying it shouldn't be, just wondering if it has been
> > traditionally?
> 
> yes
> 
> default should be "keep working as before"
> 
> it's not always nice, especially if you're trying to get rid of some
> nasty stuff, but think of it this way: you should be able to use a
> new kernel on an existing distro, at least for a reasonable type of
> distro (eg something shipped in, say, the last 2 years). In this case:
> even Fedora 10 is not likely to work!

I think with the new patches from Johannes to make the regulatory
interaction easier for hardware that has hardware/EEPROM based
regulatory enforcement like our wireless cards, it should be all good.

That seems to be 2.6.20 stuff and then it seems to be safe to remove the
WIRELESS_OLD_REGULATORY option and it would still work with old
userspace (or missing crda/iw) in cases the hardware does regulatory
enforcement.

Regards

Marcel


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Pavel Machek Oct. 27, 2008, 8:42 p.m. UTC | #7
On Sun 2008-10-26 21:22:16, Johannes Berg wrote:
> On Sun, 2008-10-26 at 13:18 -0700, Arjan van de Ven wrote:
> 
> > > Is it common practice to have compatibility options default to
> > > "y"?  I'm not saying it shouldn't be, just wondering if it has been
> > > traditionally?
> > 
> > yes
> > 
> > default should be "keep working as before"
> > 
> > it's not always nice, especially if you're trying to get rid of some
> > nasty stuff, but think of it this way: you should be able to use a
> > new kernel on an existing distro, at least for a reasonable type of
> > distro (eg something shipped in, say, the last 2 years). In this case:
> > even Fedora 10 is not likely to work!
> 
> Well, actually, it _ought_ to work fine, with a smaller set of channels,

Really? It will still break if your AP uses one of those channels, right?
Johannes Berg Oct. 28, 2008, 7:29 a.m. UTC | #8
On Mon, 2008-10-27 at 21:42 +0100, Pavel Machek wrote:

> > > it's not always nice, especially if you're trying to get rid of some
> > > nasty stuff, but think of it this way: you should be able to use a
> > > new kernel on an existing distro, at least for a reasonable type of
> > > distro (eg something shipped in, say, the last 2 years). In this case:
> > > even Fedora 10 is not likely to work!
> > 
> > Well, actually, it _ought_ to work fine, with a smaller set of channels,
> 
> Really? It will still break if your AP uses one of those channels, right?

Well yes, but the driver itself shouldn't simply fail as it did in
Arjan's case, it should just not find the AP rather than saying "sorry,
found error and can't continue" or something like that.

johannes
Bob Copeland Oct. 28, 2008, 3:13 p.m. UTC | #9
> -         Say N unless you cannot install a new userspace application
> -         or have one currently depending on the ieee80211_regdom module
> -         parameter and cannot port it to use the new userspace interfaces.
> -
> -         This is scheduled for removal for 2.6.29.
> +         Say Y unless you have installed a new userspace application.
> +         Also say Y if have one currently depending on the ieee80211_regdom
> +         module parameter and cannot port it to use the new userspace
> +         interfaces.

Ignoring the main debate :) -- I might point out the actual help text here in
is a bit user-unfriendly.  "installed a new userspace application" (which? I
just installed Firefox, does that count?)  "Also say Y if [you] have [an
application]..."
diff mbox

Patch

diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig
index 7d82be0..646c712 100644
--- a/net/wireless/Kconfig
+++ b/net/wireless/Kconfig
@@ -16,7 +16,7 @@  config NL80211
 
 config WIRELESS_OLD_REGULATORY
 	bool "Old wireless static regulatory definitions"
-	default n
+	default y
 	---help---
 	  This option enables the old static regulatory information
 	  and uses it within the new framework. This is available
@@ -40,11 +40,10 @@  config WIRELESS_OLD_REGULATORY
 	  ieee80211_regdom module parameter. This is being phased out and you
 	  should stop using them ASAP.
 
-	  Say N unless you cannot install a new userspace application
-	  or have one currently depending on the ieee80211_regdom module
-	  parameter and cannot port it to use the new userspace interfaces.
-
-	  This is scheduled for removal for 2.6.29.
+	  Say Y unless you have installed a new userspace application.
+	  Also say Y if have one currently depending on the ieee80211_regdom
+	  module parameter and cannot port it to use the new userspace
+	  interfaces.
 
 config WIRELESS_EXT
 	bool "Wireless extensions"