summaryrefslogtreecommitdiffstats
path: root/sys/netgraph/bluetooth
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2015-12-11 05:28:00 +0000
committerimp <imp@FreeBSD.org>2015-12-11 05:28:00 +0000
commit372c4744b653cb538ad633af447e0f62791de9aa (patch)
tree53b2b65701b99fe09809fbc71684efc28a02053e /sys/netgraph/bluetooth
parent77eac42e70f63160d6d267a51a880c804e5b20e7 (diff)
downloadFreeBSD-src-372c4744b653cb538ad633af447e0f62791de9aa.zip
FreeBSD-src-372c4744b653cb538ad633af447e0f62791de9aa.tar.gz
Create a USB_PNP_INFO and use it to export the existing PNP
tables. Some drivers needed some slight re-arrangement of declarations to accommodate this. Change the USB pnp tables slightly to allow better compatibility with the system by moving linux driver info from start of each entry to the end. All other PNP tables in the system have the per-device flags and such at the end of the elements rather that at the beginning. Differential Review: https://reviews.freebsd.org/D3458
Diffstat (limited to 'sys/netgraph/bluetooth')
-rw-r--r--sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c2
-rw-r--r--sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
index f34c708..4121ebc 100644
--- a/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
+++ b/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c
@@ -1872,4 +1872,4 @@ MODULE_VERSION(ng_ubt, NG_BLUETOOTH_VERSION);
MODULE_DEPEND(ng_ubt, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION);
MODULE_DEPEND(ng_ubt, ng_hci, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION, NG_BLUETOOTH_VERSION);
MODULE_DEPEND(ng_ubt, usb, 1, 1, 1);
-
+USB_PNP_HOST_INFO(ubt_devs);
diff --git a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
index da00e05..d5e55ea 100644
--- a/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
+++ b/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c
@@ -170,8 +170,15 @@ static driver_t ubtbcmfw_driver =
.size = sizeof(struct ubtbcmfw_softc),
};
+static const STRUCT_USB_HOST_ID ubtbcmfw_devs[] = {
+/* Broadcom BCM2033 devices only */
+ { USB_VPI(USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033, 0) },
+};
+
+
DRIVER_MODULE(ubtbcmfw, uhub, ubtbcmfw_driver, ubtbcmfw_devclass, NULL, 0);
MODULE_DEPEND(ubtbcmfw, usb, 1, 1, 1);
+USB_PNP_HOST_INFO(ubtbcmfw_devs);
/*
* Probe for a USB Bluetooth device
@@ -180,11 +187,6 @@ MODULE_DEPEND(ubtbcmfw, usb, 1, 1, 1);
static int
ubtbcmfw_probe(device_t dev)
{
- static const STRUCT_USB_HOST_ID devs[] = {
- /* Broadcom BCM2033 devices only */
- { USB_VPI(USB_VENDOR_BROADCOM, USB_PRODUCT_BROADCOM_BCM2033, 0) },
- };
-
struct usb_attach_arg *uaa = device_get_ivars(dev);
if (uaa->usb_mode != USB_MODE_HOST)
@@ -193,7 +195,7 @@ ubtbcmfw_probe(device_t dev)
if (uaa->info.bIfaceIndex != 0)
return (ENXIO);
- return (usbd_lookup_id_by_uaa(devs, sizeof(devs), uaa));
+ return (usbd_lookup_id_by_uaa(ubtbcmfw_devs, sizeof(ubtbcmfw_devs), uaa));
} /* ubtbcmfw_probe */
/*
OpenPOWER on IntegriCloud