b43: Add more btcoexist workarounds
authorMichael Buesch <mb@bu3sch.de>
Sat, 19 Apr 2008 14:53:00 +0000 (16:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 24 Apr 2008 01:25:34 +0000 (21:25 -0400)
This adds more workarounds for devices with broken BT bits.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/b43/main.c

index a90e902f4b3e2178de2faed69e1c67905d751bac..94a0cdeb39a8dfb62a7221ae1795f99af5d9488a 100644 (file)
@@ -4423,6 +4423,12 @@ static int b43_one_core_attach(struct ssb_device *dev, struct b43_wl *wl)
        return err;
 }
 
+#define IS_PDEV(pdev, _vendor, _device, _subvendor, _subdevice)                ( \
+       (pdev->vendor == PCI_VENDOR_ID_##_vendor) &&                    \
+       (pdev->device == _device) &&                                    \
+       (pdev->subsystem_vendor == PCI_VENDOR_ID_##_subvendor) &&       \
+       (pdev->subsystem_device == _subdevice)                          )
+
 static void b43_sprom_fixup(struct ssb_bus *bus)
 {
        struct pci_dev *pdev;
@@ -4436,10 +4442,9 @@ static void b43_sprom_fixup(struct ssb_bus *bus)
                bus->sprom.boardflags_lo |= B43_BFL_PACTRL;
        if (bus->bustype == SSB_BUSTYPE_PCI) {
                pdev = bus->host_pci;
-               if (pdev->vendor == PCI_VENDOR_ID_BROADCOM &&
-                   pdev->device == 0x4318 &&
-                   pdev->subsystem_vendor == PCI_VENDOR_ID_ASUSTEK &&
-                   pdev->subsystem_device == 0x100F)
+               if (IS_PDEV(pdev, BROADCOM, 0x4318, ASUSTEK, 0x100F) ||
+                   IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0015) ||
+                   IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0013))
                        bus->sprom.boardflags_lo &= ~B43_BFL_BTCOEXIST;
        }
 }