b43: drop SSB dependency
RFC PATCH 1/1 b43: drop SSB dependency
This adds choice submenu "Supported bus types" as two simple bool configs would allow user to compile b43 without any bus support (prety useless).
---
I'm far from being a Kconfig expert, so a detailed review is more than welcome.
--- drivers/net/wireless/b43/Kconfig | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-)
drivers/net/wireless/b43/Kconfig +28 -8
@@ -1,7 +1,6 @@ config B43 tristate "Broadcom 43xx wireless support (mac80211 stack)" - depends on SSB_POSSIBLE && MAC80211 && HAS_DMA - select SSB + depends on (BCMA_POSSIBLE || SSB_POSSIBLE) && MAC80211 && HAS_DMA select FW_LOADER ---help--- b43 is a driver for the Broadcom 43xx series wireless devices.
@@ -27,14 +26,35 @@ config B43 If unsure, say M. config B43_BCMA - bool "Support for BCMA bus" - depends on B43 && (BCMA = y || BCMA = B43) - default y + bool + depends on B43 config B43_SSB bool - depends on B43 && (SSB = y || SSB = B43) - default y + depends on B43 + +choice + prompt "Supported bus types" + depends on B43 + default B43_BCMA_AND_SSB + +config B43_BUSES_BCMA_AND_SSB + bool "BCMA and SSB" + depends on BCMA_POSSIBLE && SSB_POSSIBLE + select B43_BCMA + select B43_SSB + +config B43_BUSES_BCMA + bool "BCMA only" + depends on BCMA_POSSIBLE + select B43_BCMA + +config B43_BUSES_SSB + bool "SSB only" + depends on SSB_POSSIBLE + select B43_SSB + +endchoice # Auto-select SSB PCI-HOST support, if possible config B43_PCI_AUTOSELECT
@@ -98,7 +118,7 @@ config B43_BCMA_PIO config B43_PIO bool - depends on B43 + depends on B43 && B43_SSB select SSB_BLOCKIO default y
Signature · 1 line
1.8.4.5
RFC PATCH 1/1 b43: drop SSB dependency
drivers/net/wireless/b43/Kconfig config B43 · line 30
Quoted 6 lines · On Sat, 10 May 2014 16:44:48 +0200 Rafa? Mi?ecki <[email protected]> wrote:
config
B43_BCMAdrivers/net/wireless/b43/Kconfig +2
-3- bool "Support for BCMA bus" - depends on B43 && (BCMA = y || BCMA = B43) - default y + bool + depends on B43
A dependency on a purely selected option is ignored. So I think you can remove this one as well.
drivers/net/wireless/b43/Kconfig config B43 · line 34
Quoted 5 lines
config
B43_SSBdrivers/net/wireless/b43/Kconfig +1
-2bool - depends on B43 && (SSB = y || SSB = B43) - default y + depends on B43
Same here.
drivers/net/wireless/b43/Kconfig config B43 · line 43
Quoted 8 lines
drivers/net/wireless/b43/Kconfig +8
-0+choice + prompt "Supported bus types" + depends on B43 + default B43_BCMA_AND_SSB + +config B43_BUSES_BCMA_AND_SSB + bool "BCMA and SSB" + depends on BCMA_POSSIBLE && SSB_POSSIBLE
I think this needs to be:
depends on (BCMA_POSSIBLE && (BCMA = y || BCMA = B43)) && (SSB_POSSIBLE && (SSB = y || SSB = B43))
to avoid the case where b43 is y and ssb or bcma is m. Or did I miss something and this is caught elsewhere?
drivers/net/wireless/b43/Kconfig config B43 · line 49
Quoted 6 lines
drivers/net/wireless/b43/Kconfig +6
-0+ select B43_BCMA + select B43_SSB + +config B43_BUSES_BCMA + bool "BCMA only" + depends on BCMA_POSSIBLE
Similar here.
drivers/net/wireless/b43/Kconfig config B43 · line 54
Quoted 5 lines
drivers/net/wireless/b43/Kconfig +5
-0+ select B43_BCMA + +config B43_BUSES_SSB + bool "SSB only" + depends on SSB_POSSIBLE
And here.
Quoted 3 lines
drivers/net/wireless/b43/Kconfig +3
-0+ select B43_SSB + +endchoice
Signature · 13 lines
Michael. ---- Please use PGP/GPG encryption. Key-ID: F532BE1D908D8B0E -------- -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20140510/bfdab95b/attachment.sig>
RFC PATCH 1/1 b43: drop SSB dependency
Quoted 6 lines · Michael B?sch
drivers/net/wireless/b43/Kconfig config B43 · line 43
Quoted 3 lines · On Sat, 10 May 2014 16:44:48 +0200 Rafa? Mi?ecki <[email protected]> wrote:
drivers/net/wireless/b43/Kconfig +3
-0+config B43_BUSES_BCMA_AND_SSB + bool "BCMA and SSB" + depends on BCMA_POSSIBLE && SSB_POSSIBLE
Quoted 6 lines
I think this needs to be:
depends on (BCMA_POSSIBLE && (BCMA = y || BCMA = B43)) && (SSB_POSSIBLE && (SSB = y || SSB = B43))to avoid the case where b43 is y and ssb or bcma is m. Or did I miss something and this is caught elsewhere?
Oh, wait, I think I meant B43_BUSES_BCMA_AND_SSB to select BCMA and SSB (so user doesn't have to enable BCMA and SSB on his own). It it the way it's handled without my patch (B43 select-s SSB).
I'd like to add
select BCMA
select SSB
, but this won't guarantee BCMA (or SSB) being "y" after choosing B43 to "y". Or will it?
Any idea how to handle that?
RFC PATCH 1/1 b43: drop SSB dependency
Quoted 18 lines · On Sat, 10 May 2014 18:12:15 +0200 Rafa? Mi?ecki <[email protected]> wrote:
Quoted 6 lines · Michael B?sch
drivers/net/wireless/b43/Kconfig config B43 · line 43
Quoted 3 lines · On Sat, 10 May 2014 16:44:48 +0200 Rafa? Mi?ecki <[email protected]> wrote:
drivers/net/wireless/b43/Kconfig +3
-0+config B43_BUSES_BCMA_AND_SSB + bool "BCMA and SSB" + depends on BCMA_POSSIBLE && SSB_POSSIBLEQuoted 6 lines
I think this needs to be:
depends on (BCMA_POSSIBLE && (BCMA = y || BCMA = B43)) && (SSB_POSSIBLE && (SSB = y || SSB = B43))to avoid the case where b43 is y and ssb or bcma is m. Or did I miss something and this is caught elsewhere?
Oh, wait, I think I meant
B43_BUSES_BCMA_AND_SSBto select BCMA and SSB (so user doesn't have to enable BCMA and SSB on his own). It it the way it's handled without my patch (B43 select-s SSB).
Quoted 5 lines
I'd like to add
select BCMA
select SSB
, but this won't guarantee BCMA (or SSB) being "y" after choosing B43 to "y". Or will it?
I'm currently unsure.
You probably want to add select SSB to config B43_SSB and the same for B43_BCMA.
Quoted 1 line
Any idea how to handle that?
The (SSB = y || SSB = B43) dependency is supposed to handle that. And it was required in the past. But maybe it's not required anymore due to other changes. I'm not sure.
Signature · 13 lines
Michael. ---- Please use PGP/GPG encryption. Key-ID: F532BE1D908D8B0E -------- -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20140510/bea360a5/attachment-0001.sig>
RFC PATCH 1/1 b43: drop SSB dependency
Quoted 21 lines · Michael B?sch
Quoted 18 lines · On Sat, 10 May 2014 18:12:15 +0200 Rafa? Mi?ecki <[email protected]> wrote:
Quoted 6 lines · Michael B?sch
drivers/net/wireless/b43/Kconfig config B43 · line 43
Quoted 3 lines · On Sat, 10 May 2014 16:44:48 +0200 Rafa? Mi?ecki <[email protected]> wrote:
drivers/net/wireless/b43/Kconfig +3
-0+config B43_BUSES_BCMA_AND_SSB + bool "BCMA and SSB" + depends on BCMA_POSSIBLE && SSB_POSSIBLEQuoted 6 lines
I think this needs to be:
depends on (BCMA_POSSIBLE && (BCMA = y || BCMA = B43)) && (SSB_POSSIBLE && (SSB = y || SSB = B43))to avoid the case where b43 is y and ssb or bcma is m. Or did I miss something and this is caught elsewhere?
Oh, wait, I think I meant
B43_BUSES_BCMA_AND_SSBto select BCMA and SSB (so user doesn't have to enable BCMA and SSB on his own). It it the way it's handled without my patch (B43 select-s SSB).
Quoted 8 lines
Quoted 5 lines
I'd like to add
select BCMA
select SSB
, but this won't guarantee BCMA (or SSB) being "y" after choosing B43 to "y". Or will it?I'm currently unsure.
You probably want to add select SSB to configB43_SSBand the same forB43_BCMA.
I've just tried this, however this will force SSB to be "y" (even if B43 is "m"). We have to select BCMA/SSB from non-bool configs. This lead me to the idea of select-ing SSB and BCMA in "B43" depending on the B43_BCMA and B43_SSB. That should make the trick. I'll test it and submit V2.
RFC PATCH 1/1 b43: drop SSB dependency
Quoted 5 lines · On Sat, 10 May 2014 19:05:33 +0200 Rafa? Mi?ecki <[email protected]> wrote:
Quoted 2 lines
I'm currently unsure.
You probably want to add select SSB to configB43_SSBand the same forB43_BCMA.I've just tried this, however this will force SSB to be "y" (even if B43 is "m"). We have to select BCMA/SSB from non-bool configs.
Hm, OK makes sense.
Quoted 3 lines
This lead me to the idea of select-ing SSB and BCMA in "B43" depending on the
B43_BCMAandB43_SSB. That should make the trick. I'll test it and submit V2.
Could work, if you drop the unnecessary B43 dependency in those options.
Signature · 13 lines
Michael. ---- Please use PGP/GPG encryption. Key-ID: F532BE1D908D8B0E -------- -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://lists.infradead.org/pipermail/b43-dev/attachments/20140510/15f5ed7d/attachment.sig>
PATCH v2 1/1 b43: drop SSB dependency
In reply to Rafał MiłeckiThis adds choice submenu "Supported bus types" as two simple bool configs would allow user to compile b43 without any bus support (prety useless).
---
V2: Drop "depends" from B43_BCMA and B43_SSB, as Michael noticed - it didn't
make much sense.
Auto-select BCMA/SSB in B43 config. This keeps user-friendly behavior that existed up to now (it's extended to hover BCMA as well). It also assures B43 won't be "y" with BCMA/SSB being "m".
--- drivers/net/wireless/b43/Kconfig | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-)
drivers/net/wireless/b43/Kconfig +28 -8
@@ -1,7 +1,8 @@ config B43 tristate "Broadcom 43xx wireless support (mac80211 stack)" - depends on SSB_POSSIBLE && MAC80211 && HAS_DMA - select SSB + depends on (BCMA_POSSIBLE || SSB_POSSIBLE) && MAC80211 && HAS_DMA + select BCMA if B43_BCMA + select SSB if B43_SSB select FW_LOADER ---help--- b43 is a driver for the Broadcom 43xx series wireless devices.
@@ -27,14 +28,33 @@ config B43 If unsure, say M. config B43_BCMA - bool "Support for BCMA bus" - depends on B43 && (BCMA = y || BCMA = B43) - default y + bool config B43_SSB bool - depends on B43 && (SSB = y || SSB = B43) - default y + +choice + prompt "Supported bus types" + depends on B43 + default B43_BCMA_AND_SSB + +config B43_BUSES_BCMA_AND_SSB + bool "BCMA and SSB" + depends on BCMA_POSSIBLE && SSB_POSSIBLE + select B43_BCMA + select B43_SSB + +config B43_BUSES_BCMA + bool "BCMA only" + depends on BCMA_POSSIBLE + select B43_BCMA + +config B43_BUSES_SSB + bool "SSB only" + depends on SSB_POSSIBLE + select B43_SSB + +endchoice # Auto-select SSB PCI-HOST support, if possible config B43_PCI_AUTOSELECT
@@ -98,7 +118,7 @@ config B43_BCMA_PIO config B43_PIO bool - depends on B43 + depends on B43 && B43_SSB select SSB_BLOCKIO default y
Signature · 1 line
1.8.4.5
PATCH v2 1/1 b43: drop SSB dependency
Quoted 3 lines · Rafa? Mi?ecki
This adds choice submenu "Supported bus types" as two simple bool configs would allow user to compile b43 without any bus support (prety useless).
John: please make sure this one goes *after* [PATCH V2] b43: adjust code to compile without SSB
I could do better and send it as a patchset, my bad, sorry.