Skip to contentSkip to conversation

b43: add default option to avoid duplicating device support with brcmsmac

PATCH In review John W. Linville 5 participants 11 messages Jan 11, 2012 – Jan 16, 2012 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 b43: add default option to avoid duplicating device support with brcmsmac

---
 drivers/net/wireless/b43/Kconfig |    5 +++++
 drivers/net/wireless/b43/main.c  |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)
drivers/net/wireless/b43/Kconfig +5 -0
index b97a40e..8139fc7 100644
@@ -31,6 +31,11 @@ config B43_BCMA
 	depends on B43 && BCMA
 	default y
 
+config B43_BCMA_EXTRA
+	bool "Support for devices also supported by brcmsmac"
+	depends on B43_BCMA
+	default n
+
 config B43_SSB
 	bool
 	depends on B43 && SSB
drivers/net/wireless/b43/main.c +2 -0
index 989f654..e2e2d11 100644
@@ -116,8 +116,10 @@ MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
 #ifdef CONFIG_B43_BCMA
 static const struct bcma_device_id b43_bcma_tbl[] = {
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x11, BCMA_ANY_CLASS),
+#ifdef CONFIG_B43_BCMA_EXTRA
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x17, BCMA_ANY_CLASS),
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x18, BCMA_ANY_CLASS),
+#endif
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x1D, BCMA_ANY_CLASS),
 	BCMA_CORETABLE_END
 };
Signature · 1 line
1.7.4.4
#1 lore raw

drivers/net/wireless/b43/Kconfig config B43_BCMA · line 37

Quoted 11 lines · John W. Linville
---
 drivers/net/wireless/b43/Kconfig |    5 +++++
 drivers/net/wireless/b43/main.c  |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)
drivers/net/wireless/b43/Kconfig +4 -0
+config B43_BCMA_EXTRA
+	bool "Support for devices also supported by brcmsmac"
+	depends on B43_BCMA
+	default n

If I am not mistaken the 'default n' is not really needed.

Gr. AvS

#2 lore raw
Quoted 7 lines · Arend van Spriel
Quoted 6 lines · John W. Linville
---
 drivers/net/wireless/b43/Kconfig |    5 +++++
 drivers/net/wireless/b43/main.c  |    2 ++
 2 files changed, 7 insertions(+), 0 deletions(-)
Quoted 7 lines

drivers/net/wireless/b43/Kconfig config B43_BCMA · line 37

Quoted 5 lines
drivers/net/wireless/b43/Kconfig +4 -0
+config B43_BCMA_EXTRA
+	bool "Support for devices also supported by brcmsmac"
+	depends on B43_BCMA
+	default n

If I am not mistaken the 'default n' is not really needed.

But I _really_ mean it!! :-)

I'll drop that line in the final commit...

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
#3 lore raw

PATCH 1/1 b43: add default option to avoid duplicating device support with brcmsmac

In reply to John W. Linville

2012/1/11 John W. Linville <[email protected]>:

Review

Quoted 5 lines
(quoted diff) +5 -0
+config B43_BCMA_EXTRA
+ ? ? ? bool "Support for devices also supported by brcmsmac"
+ ? ? ? depends on B43_BCMA
+ ? ? ? default n
+

Is this really *the* solution? I wonder if we can do whatever you're trying to do in a better way? To let final users try both drivers without recompiling kernel?

The description also isn't saying too much. I can't imagine anyone taking decision advisedly other than "n, as it's the default". On other hand, what should we put here? The whole comparison of drivers? Can be hard, but I really think there should be more info.

Signature · 1 line
Rafa?
#4 lore raw

PATCH 1/1 b43: add default option to avoid duplicating device support with brcmsmac

Quoted 10 lines · Rafa? Mi?ecki

2012/1/11 John W. Linville <[email protected]>:

Review

Quoted 5 lines
(quoted diff) +5 -0
+config B43_BCMA_EXTRA
+ ? ? ? bool "Support for devices also supported by brcmsmac"
+ ? ? ? depends on B43_BCMA
+ ? ? ? default n
+

Is this really *the* solution? I wonder if we can do whatever you're trying to do in a better way? To let final users try both drivers without recompiling kernel?

Saying "y" would let users try both drivers. That is up to the distros or other kernel builders to choose.

At present, they have no choice but to let the two drivers race to see who gets loaded first or whatever. I imagine that some would prefer to have an option that prevents that.

Quoted 4 lines

The description also isn't saying too much. I can't imagine anyone taking decision advisedly other than "n, as it's the default". On other hand, what should we put here? The whole comparison of drivers? Can be hard, but I really think there should be more info.

More info could be put in a "---help---" section. The summary line could be different as well, if you can think of a better way to describe the issue. I am open to suggestions.

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.
#5 lore raw

PATCH 1/1 b43: add default option to avoid duplicating device support with brcmsmac

Quoted 2 lines · John W. Linville

The summary line could be different as well, if you can think of a better way to describe the issue. I am open to suggestions.

I think these terms are clear:

Community b43 driver
Broadcom brcmsmac driver

How to apply them I leave up to you. :)

//Peter

#6 lore raw

PATCH 1/1 b43: add default option to avoid duplicating device support with brcmsmac

Quoted 10 lines · Peter Stuge
Quoted 2 lines · John W. Linville

The summary line could be different as well, if you can think of a better way to describe the issue. I am open to suggestions.

I think these terms are clear:

Community b43 driver
Broadcom brcmsmac driver

How to apply them I leave up to you. :)

Maybe you think that is clear, but it doesn't do much for me.

I could say "Support for devices already supported by the Broadcom-supported brcmsmac driver"?

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.
#7 lore raw
In reply to Rafał Miłecki

2012/1/13 Rafał Miłecki <[email protected]>:

Quoted 10 lines

2012/1/11 John W. Linville <[email protected]>:

drivers/net/wireless/b43/Kconfig config B43_BCMA · line 38

Quoted 5 lines
drivers/net/wireless/b43/Kconfig +5 -0
+config B43_BCMA_EXTRA
+       bool "Support for devices also supported by brcmsmac"
+       depends on B43_BCMA
+       default n
+

Is this really *the* solution? I wonder if we can do whatever you're trying to do in a better way? To let final users try both drivers without recompiling kernel?

Another issue is that this should arguably be default y if brcmsmac is disabled.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
#8 lore raw

PATCH 1/1 b43: add default option to avoid duplicating device support with brcmsmac

Quoted 12 lines · Julian Calaby

2012/1/13 Rafa? Mi?ecki <[email protected]>:

Quoted 10 lines

2012/1/11 John W. Linville <[email protected]>:

Review

Quoted 5 lines
(quoted diff) +5 -0
+config B43_BCMA_EXTRA
+ ? ? ? bool "Support for devices also supported by brcmsmac"
+ ? ? ? depends on B43_BCMA
+ ? ? ? default n
+

Is this really *the* solution? I wonder if we can do whatever you're trying to do in a better way? To let final users try both drivers without recompiling kernel?

Quoted 1 line

Another issue is that this should arguably be default y if brcmsmac is disabled.

Can you help by suggesting the correct Kconfig magic to implement that?

John

Signature · 2 lines
John W. Linville		Someday the world will need a hero, and you
linville at tuxdriver.com			might be all we have.  Be ready.
#9 lore raw

John,

Quoted 13 lines · John W. Linville
Quoted 12 lines · Julian Calaby

2012/1/13 Rafał Miłecki <[email protected]>:

Quoted 10 lines

2012/1/11 John W. Linville <[email protected]>:

drivers/net/wireless/b43/Kconfig config B43_BCMA · line 38

Quoted 5 lines
drivers/net/wireless/b43/Kconfig +5 -0
+config B43_BCMA_EXTRA
+       bool "Support for devices also supported by brcmsmac"
+       depends on B43_BCMA
+       default n
+

Is this really *the* solution? I wonder if we can do whatever you're trying to do in a better way? To let final users try both drivers without recompiling kernel?

Quoted 3 lines
Quoted 1 line

Another issue is that this should arguably be default y if brcmsmac is disabled.

Can you help by suggesting the correct Kconfig magic to implement that?

I believe that if you change your default line to:

default y if !BRCMSMAC

it should have the desired effect.

See the FONT_8x8 config option in drivers/video/console/Kconfig (line #150) for an example.

Thanks,

Signature · 5 lines
Julian Calaby

Email: [email protected]
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
#10 lore raw

PATCH v2 1/1 b43: add default option to avoid duplicating device support with brcmsmac

In reply to John W. Linville

---
The dual default lines were the only combination I could find that actually defaulted to "N" if brcmsmac was already enabled and to "Y" otherwise. If anyone knows better magic for this, then please speak-up!

 drivers/net/wireless/b43/Kconfig |    6 ++++++
 drivers/net/wireless/b43/main.c  |    2 ++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/net/wireless/b43/Kconfig +6 -0
index b97a40e..edb4ab2 100644
@@ -31,6 +31,12 @@ config B43_BCMA
 	depends on B43 && BCMA
 	default y
 
+config B43_BCMA_EXTRA
+	bool "Hardware support that overlaps with Broadcom-supported brcmsmac driver"
+	depends on B43_BCMA
+	default n if BRCMSMAC || BRCMSMAC_MODULE
+	default	y
+
 config B43_SSB
 	bool
 	depends on B43 && SSB
drivers/net/wireless/b43/main.c +2 -0
index 41c83d9..b1ae675 100644
@@ -116,8 +116,10 @@ MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
 #ifdef CONFIG_B43_BCMA
 static const struct bcma_device_id b43_bcma_tbl[] = {
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x11, BCMA_ANY_CLASS),
+#ifdef CONFIG_B43_BCMA_EXTRA
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x17, BCMA_ANY_CLASS),
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x18, BCMA_ANY_CLASS),
+#endif
 	BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x1D, BCMA_ANY_CLASS),
 	BCMA_CORETABLE_END
 };
Signature · 1 line
1.7.4.4