]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
b43: replace B43_BCMA_EXTRA with modparam allhwsupport
authorRafał Miłecki <zajec5@gmail.com>
Wed, 26 Jun 2013 07:55:54 +0000 (09:55 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 27 Jun 2013 17:42:15 +0000 (13:42 -0400)
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>
drivers/net/wireless/b43/Kconfig
drivers/net/wireless/b43/main.c

index 3f21e0ba39badb430dee5db447d37d17dc332a11..51ff0b198d0a94c6486bec11136a6b08ea9d29c2 100644 (file)
@@ -31,12 +31,6 @@ config B43_BCMA
        depends on B43 && (BCMA = y || BCMA = B43)
        default y
 
-config B43_BCMA_EXTRA
-       bool "Hardware support that overlaps with the brcmsmac driver"
-       depends on B43_BCMA
-       default n if BRCMSMAC
-       default y
-
 config B43_SSB
        bool
        depends on B43 && (SSB = y || SSB = B43)
index a95b77ab360eaf7761bbb93e2eb92ad45ad13e14..0e933bb715433b0c9286ac084b96c44f8972f8d9 100644 (file)
@@ -113,13 +113,15 @@ static int b43_modparam_pio = 0;
 module_param_named(pio, b43_modparam_pio, int, 0644);
 MODULE_PARM_DESC(pio, "Use PIO accesses by default: 0=DMA, 1=PIO");
 
+static int modparam_allhwsupport = !IS_ENABLED(CONFIG_BRCMSMAC);
+module_param_named(allhwsupport, modparam_allhwsupport, int, 0444);
+MODULE_PARM_DESC(allhwsupport, "Enable support for all hardware (even it if overlaps with the brcmsmac driver)");
+
 #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
 };
@@ -5396,6 +5398,12 @@ static int b43_bcma_probe(struct bcma_device *core)
        struct b43_wl *wl;
        int err;
 
+       if (!modparam_allhwsupport &&
+           (core->id.rev == 0x17 || core->id.rev == 0x18)) {
+               pr_err("Support for cores revisions 0x17 and 0x18 disabled by module param allhwsupport=0. Try b43.allhwsupport=1\n");
+               return -ENOTSUPP;
+       }
+
        dev = b43_bus_dev_bcma_init(core);
        if (!dev)
                return -ENODEV;