Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

b43: replace B43_BCMA_EXTRA with modparam allhwsupport

This allows enabling support for extra hardware with just a module
param, without kernel/module recompilation.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Rafał Miłecki and committed by
John W. Linville
8960400e d847e3e2

+10 -8
-6
drivers/net/wireless/b43/Kconfig
··· 31 31 depends on B43 && (BCMA = y || BCMA = B43) 32 32 default y 33 33 34 - config B43_BCMA_EXTRA 35 - bool "Hardware support that overlaps with the brcmsmac driver" 36 - depends on B43_BCMA 37 - default n if BRCMSMAC 38 - default y 39 - 40 34 config B43_SSB 41 35 bool 42 36 depends on B43 && (SSB = y || SSB = B43)
+10 -2
drivers/net/wireless/b43/main.c
··· 113 113 module_param_named(pio, b43_modparam_pio, int, 0644); 114 114 MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO"); 115 115 116 + static int modparam_allhwsupport = !IS_ENABLED(CONFIG_BRCMSMAC); 117 + module_param_named(allhwsupport, modparam_allhwsupport, int, 0444); 118 + MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the brcmsmac driver)"); 119 + 116 120 #ifdef CONFIG_B43_BCMA 117 121 static const struct bcma_device_id b43_bcma_tbl[] = { 118 122 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x11, BCMA_ANY_CLASS), 119 - #ifdef CONFIG_B43_BCMA_EXTRA 120 123 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x17, BCMA_ANY_CLASS), 121 124 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x18, BCMA_ANY_CLASS), 122 - #endif 123 125 BCMA_CORE(BCMA_MANUF_BCM, BCMA_CORE_80211, 0x1D, BCMA_ANY_CLASS), 124 126 BCMA_CORETABLE_END 125 127 }; ··· 5397 5395 struct b43_bus_dev *dev; 5398 5396 struct b43_wl *wl; 5399 5397 int err; 5398 + 5399 + if (!modparam_allhwsupport && 5400 + (core->id.rev == 0x17 || core->id.rev == 0x18)) { 5401 + pr_err("Support for cores revisions 0x17 and 0x18 disabled by module param allhwsupport=0. Try b43.allhwsupport=1\n"); 5402 + return -ENOTSUPP; 5403 + } 5400 5404 5401 5405 dev = b43_bus_dev_bcma_init(core); 5402 5406 if (!dev)