Skip to content

Commit

Permalink
b43: ssb: refuse to support more than IEEE 802.11 core
Browse files Browse the repository at this point in the history
Some ancient Broadcom devices had one core per band, e.g.:
ssb: Found chip with id 0x4306, rev 0x02 and package 0x00
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x02, vendor 0x4243)
ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x04, vendor 0x4243)
ssb: Core 2 found: PCMCIA (cc 0x80D, rev 0x01, vendor 0x4243)
ssb: Core 3 found: V90 (cc 0x807, rev 0x01, vendor 0x4243)
ssb: Core 4 found: PCI (cc 0x804, rev 0x07, vendor 0x4243)
ssb: Core 5 found: IEEE 802.11 (cc 0x812, rev 0x04, vendor 0x4243)

This hardware model was dropped for newer devices handled by b43.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rafał Miłecki authored and John W. Linville committed Apr 22, 2014
1 parent 5575792 commit 8f15e28
Showing 1 changed file with 20 additions and 17 deletions.
37 changes: 20 additions & 17 deletions drivers/net/wireless/b43/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5486,39 +5486,42 @@ int b43_ssb_probe(struct ssb_device *sdev, const struct ssb_device_id *id)
struct b43_bus_dev *dev;
struct b43_wl *wl;
int err;
int first = 0;

dev = b43_bus_dev_ssb_init(sdev);
if (!dev)
return -ENOMEM;

wl = ssb_get_devtypedata(sdev);
if (!wl) {
/* Probing the first core. Must setup common struct b43_wl */
first = 1;
b43_sprom_fixup(sdev->bus);
wl = b43_wireless_init(dev);
if (IS_ERR(wl)) {
err = PTR_ERR(wl);
goto out;
}
ssb_set_devtypedata(sdev, wl);
B43_WARN_ON(ssb_get_devtypedata(sdev) != wl);
if (wl) {
b43err(NULL, "Dual-core devices are not supported\n");
err = -ENOTSUPP;
goto err_ssb_kfree_dev;
}

b43_sprom_fixup(sdev->bus);

wl = b43_wireless_init(dev);
if (IS_ERR(wl)) {
err = PTR_ERR(wl);
goto err_ssb_kfree_dev;
}
ssb_set_devtypedata(sdev, wl);
B43_WARN_ON(ssb_get_devtypedata(sdev) != wl);

err = b43_one_core_attach(dev, wl);
if (err)
goto err_wireless_exit;
goto err_ssb_wireless_exit;

/* setup and start work to load firmware */
INIT_WORK(&wl->firmware_load, b43_request_firmware);
schedule_work(&wl->firmware_load);

out:
return err;

err_wireless_exit:
if (first)
b43_wireless_exit(dev, wl);
err_ssb_wireless_exit:
b43_wireless_exit(dev, wl);
err_ssb_kfree_dev:
kfree(dev);
return err;
}

Expand Down

0 comments on commit 8f15e28

Please sign in to comment.