Commit 39381f70 authored by Marcel Holtmann's avatar Marcel Holtmann

[Bluetooth] Add support for the Digianswer USB devices

The Digianswer USB Bluetooth devices uses a bRequestType of 0x40
for HCI commands, but the Bluetooth specification says that the
correct value is 0x20. This patch sets the needed value according
to the vendor and product id's of the Bluetooth device.
parent 3e398d35
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
static struct usb_driver hci_usb_driver; static struct usb_driver hci_usb_driver;
static struct usb_device_id bluetooth_ids[] = { static struct usb_device_id bluetooth_ids[] = {
/* Digianswer device */
{ USB_DEVICE(0x08fd, 0x0001), driver_info: HCI_DIGIANSWER },
/* Generic Bluetooth USB device */ /* Generic Bluetooth USB device */
{ USB_DEVICE_INFO(HCI_DEV_CLASS, HCI_DEV_SUBCLASS, HCI_DEV_PROTOCOL) }, { USB_DEVICE_INFO(HCI_DEV_CLASS, HCI_DEV_SUBCLASS, HCI_DEV_PROTOCOL) },
...@@ -426,7 +429,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb) ...@@ -426,7 +429,7 @@ static inline int hci_usb_send_ctrl(struct hci_usb *husb, struct sk_buff *skb)
} else } else
dr = (void *) _urb->urb.setup_packet; dr = (void *) _urb->urb.setup_packet;
dr->bRequestType = HCI_CTRL_REQ; dr->bRequestType = husb->ctrl_req;
dr->bRequest = 0; dr->bRequest = 0;
dr->wIndex = 0; dr->wIndex = 0;
dr->wValue = 0; dr->wValue = 0;
...@@ -872,6 +875,11 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id) ...@@ -872,6 +875,11 @@ int hci_usb_probe(struct usb_interface *intf, const struct usb_device_id *id)
husb->bulk_in_ep = bulk_in_ep[0]; husb->bulk_in_ep = bulk_in_ep[0];
husb->intr_in_ep = intr_in_ep[0]; husb->intr_in_ep = intr_in_ep[0];
if (id->driver_info & HCI_DIGIANSWER)
husb->ctrl_req = HCI_DIGI_REQ;
else
husb->ctrl_req = HCI_CTRL_REQ;
#ifdef CONFIG_BT_USB_SCO #ifdef CONFIG_BT_USB_SCO
if (isoc_iface) { if (isoc_iface) {
BT_DBG("isoc ifnum %d alts %d", isoc_ifnum, isoc_alts); BT_DBG("isoc ifnum %d alts %d", isoc_ifnum, isoc_alts);
......
...@@ -35,6 +35,9 @@ ...@@ -35,6 +35,9 @@
#define HCI_DEV_PROTOCOL 0x01 /* Bluetooth programming protocol */ #define HCI_DEV_PROTOCOL 0x01 /* Bluetooth programming protocol */
#define HCI_CTRL_REQ 0x20 #define HCI_CTRL_REQ 0x20
#define HCI_DIGI_REQ 0x40
#define HCI_DIGIANSWER 0x01
#define HCI_MAX_IFACE_NUM 3 #define HCI_MAX_IFACE_NUM 3
...@@ -122,6 +125,8 @@ struct hci_usb { ...@@ -122,6 +125,8 @@ struct hci_usb {
struct usb_host_endpoint *isoc_out_ep; struct usb_host_endpoint *isoc_out_ep;
struct usb_host_endpoint *isoc_in_ep; struct usb_host_endpoint *isoc_in_ep;
__u8 ctrl_req;
struct sk_buff_head transmit_q[4]; struct sk_buff_head transmit_q[4];
struct sk_buff *reassembly[4]; // Reassembly buffers struct sk_buff *reassembly[4]; // Reassembly buffers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment