}
#define BRCMF_SDIO_DEVICE(dev_id) \
- {SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, dev_id)}
+ { \
+ SDIO_DEVICE(SDIO_VENDOR_ID_BROADCOM, dev_id), \
+ .driver_data = BRCMF_FWVENDOR_WCC \
+ }
/* devices we support, null terminated */
static const struct sdio_device_id brcmf_sdmmc_ids[] = {
sdiodev->bus_if = bus_if;
bus_if->bus_priv.sdio = sdiodev;
bus_if->proto_type = BRCMF_PROTO_BCDC;
+ bus_if->fwvid = id->driver_data;
dev_set_drvdata(&func->dev, bus_if);
dev_set_drvdata(&sdiodev->func1->dev, bus_if);
sdiodev->dev = &sdiodev->func1->dev;
/* The maximum console interval value (5 mins) */
#define MAX_CONSOLE_INTERVAL (5 * 60)
+enum brcmf_fwvendor {
+ BRCMF_FWVENDOR_WCC,
+ /* keep last */
+ BRCMF_FWVENDOR_NUM,
+ BRCMF_FWVENDOR_INVALID
+};
+
/* The level of bus communication with the dongle */
enum brcmf_bus_state {
BRCMF_BUS_DOWN, /* Not ready for frame transfers */
* @stats: statistics shared between common and bus layer.
* @maxctl: maximum size for rxctl request message.
* @chip: device identifier of the dongle chip.
+ * @chiprev: revision of the dongle chip.
+ * @fwvid: firmware vendor-support identifier of the device.
* @always_use_fws_queue: bus wants use queue also when fwsignal is inactive.
* @wowl_supported: is wowl supported by bus driver.
- * @chiprev: revision of the dongle chip.
* @msgbuf: msgbuf protocol parameters provided by bus layer.
*/
struct brcmf_bus {
uint maxctl;
u32 chip;
u32 chiprev;
+ enum brcmf_fwvendor fwvid;
bool always_use_fws_queue;
bool wowl_supported;
bus->bus_priv.pcie = pcie_bus_dev;
bus->ops = &brcmf_pcie_bus_ops;
bus->proto_type = BRCMF_PROTO_MSGBUF;
+ bus->fwvid = id->driver_data;
bus->chip = devinfo->coreid;
bus->wowl_supported = pci_pme_capable(pdev, PCI_D3hot);
dev_set_drvdata(&pdev->dev, bus);
#endif /* CONFIG_PM */
-#define BRCMF_PCIE_DEVICE(dev_id) { BRCM_PCIE_VENDOR_ID_BROADCOM, dev_id,\
- PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, 0 }
-#define BRCMF_PCIE_DEVICE_SUB(dev_id, subvend, subdev) { \
- BRCM_PCIE_VENDOR_ID_BROADCOM, dev_id,\
- subvend, subdev, PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, 0 }
+#define BRCMF_PCIE_DEVICE(dev_id) \
+ { \
+ BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \
+ PCI_ANY_ID, PCI_ANY_ID, \
+ PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \
+ BRCMF_FWVENDOR_WCC \
+ }
+#define BRCMF_PCIE_DEVICE_SUB(dev_id, subvend, subdev) \
+ { \
+ BRCM_PCIE_VENDOR_ID_BROADCOM, (dev_id), \
+ (subvend), (subdev), \
+ PCI_CLASS_NETWORK_OTHER << 8, 0xffff00, \
+ BRCMF_FWVENDOR_WCC \
+ }
static const struct pci_device_id brcmf_pcie_devid_table[] = {
BRCMF_PCIE_DEVICE(BRCM_PCIE_4350_DEVICE_ID),
return fwreq;
}
-static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo)
+static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo,
+ enum brcmf_fwvendor fwvid)
{
struct brcmf_bus *bus = NULL;
struct brcmf_usbdev *bus_pub = NULL;
dev_set_drvdata(dev, bus);
bus->ops = &brcmf_usb_bus_ops;
bus->proto_type = BRCMF_PROTO_BCDC;
+ bus->fwvid = fwvid;
bus->always_use_fws_queue = true;
#ifdef CONFIG_PM
bus->wowl_supported = true;
else
brcmf_dbg(USB, "Broadcom full speed USB WLAN interface detected\n");
- ret = brcmf_usb_probe_cb(devinfo);
+ ret = brcmf_usb_probe_cb(devinfo, id->driver_info);
if (ret)
goto fail;
return ret;
}
-#define BRCMF_USB_DEVICE(dev_id) \
- { USB_DEVICE(BRCM_USB_VENDOR_ID_BROADCOM, dev_id) }
+#define BRCMF_USB_DEVICE(dev_id) \
+ { \
+ USB_DEVICE(BRCM_USB_VENDOR_ID_BROADCOM, dev_id), \
+ .driver_info = BRCMF_FWVENDOR_WCC \
+ }
-#define LINKSYS_USB_DEVICE(dev_id) \
- { USB_DEVICE(BRCM_USB_VENDOR_ID_LINKSYS, dev_id) }
+#define LINKSYS_USB_DEVICE(dev_id) \
+ { \
+ USB_DEVICE(BRCM_USB_VENDOR_ID_LINKSYS, dev_id), \
+ .driver_info = BRCMF_FWVENDOR_WCC \
+ }
-#define CYPRESS_USB_DEVICE(dev_id) \
- { USB_DEVICE(CY_USB_VENDOR_ID_CYPRESS, dev_id) }
+#define CYPRESS_USB_DEVICE(dev_id) \
+ { \
+ USB_DEVICE(CY_USB_VENDOR_ID_CYPRESS, dev_id), \
+ .driver_info = BRCMF_FWVENDOR_WCC \
+ }
static const struct usb_device_id brcmf_usb_devid_table[] = {
BRCMF_USB_DEVICE(BRCM_USB_43143_DEVICE_ID),