43#include <sys/kernel.h>
45#include <sys/module.h>
47#include <sys/taskqueue.h>
50#include <dev/usb/usb.h>
51#include <dev/usb/usbdi.h>
106 void *resp, uint8_t resp_len)
108#define UBT_INTEL_HCICMD_TIMEOUT 2000
113 memset(&
cmd, 0,
sizeof(
cmd));
116 resp_len, M_TEMP, M_ZERO | M_WAITOK);
120 if (error != USB_ERR_NORMAL_COMPLETION)
125 memcpy(resp, evt->
data, resp_len);
127 error = USB_ERR_INVAL;
140 struct usb_attach_arg *uaa = device_get_ivars(dev);
145 if (uaa->usb_mode != USB_MODE_HOST)
148 if (uaa->info.bIfaceIndex != 0)
156 switch (USB_GET_DRIVER_INFO(uaa)) {
166 &reset,
sizeof(reset)) != USB_ERR_NORMAL_COMPLETION)
168 if (reset.status != 0)
194 if (
version.fw_variant != 0x23)
199 KASSERT(0 == 1, (
"Unknown DRIVER_INFO"));
202 return (BUS_PROBE_DEFAULT);
#define NG_BLUETOOTH_VERSION
#define NG_HCI_EVENT_COMMAND_COMPL
#define NG_HCI_OGF_VENDOR
ng_hci_status_rp ng_hci_reset_rp
#define NG_HCI_OGF_HC_BASEBAND
#define NG_HCI_OPCODE(gf, cf)
usb_error_t ubt_do_hci_request(struct usb_device *udev, struct ubt_hci_cmd *cmd, void *evt, usb_timeout_t timeout)
static const STRUCT_USB_HOST_ID ubt_intel_devs[]
static device_method_t ubt_intel_methods[]
static device_probe_t ubt_intel_probe
DRIVER_MODULE(ng_ubt_intel, uhub, ubt_intel_driver, ubt_devclass, 0, 0)
DEFINE_CLASS_1(ubt, ubt_intel_driver, ubt_intel_methods, sizeof(struct ubt_softc), ubt_driver)
static usb_error_t ubt_intel_do_hci_request(struct usb_device *udev, uint16_t opcode, void *resp, uint8_t resp_len)
MODULE_DEPEND(ng_ubt_intel, netgraph, NG_ABI_VERSION, NG_ABI_VERSION, NG_ABI_VERSION)
struct ubt_intel_version_rp __attribute__((packed))
#define UBT_INTEL_HCICMD_TIMEOUT
MODULE_VERSION(ng_ubt_intel, NG_BLUETOOTH_VERSION)
#define UBT_HCI_EVENT_COMPL_HEAD_SIZE
struct ubt_hci_evhdr header