diff options
Diffstat (limited to 'drivers/bluetooth/btusb.c')
-rw-r--r-- | drivers/bluetooth/btusb.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index ed7b33b06b43..292c38e8aa17 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -48,6 +48,7 @@ static struct usb_driver btusb_driver; | |||
48 | #define BTUSB_INTEL 0x100 | 48 | #define BTUSB_INTEL 0x100 |
49 | #define BTUSB_INTEL_BOOT 0x200 | 49 | #define BTUSB_INTEL_BOOT 0x200 |
50 | #define BTUSB_BCM_PATCHRAM 0x400 | 50 | #define BTUSB_BCM_PATCHRAM 0x400 |
51 | #define BTUSB_MARVELL 0x800 | ||
51 | 52 | ||
52 | static const struct usb_device_id btusb_table[] = { | 53 | static const struct usb_device_id btusb_table[] = { |
53 | /* Generic Bluetooth USB device */ | 54 | /* Generic Bluetooth USB device */ |
@@ -113,6 +114,9 @@ static const struct usb_device_id btusb_table[] = { | |||
113 | { USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01), | 114 | { USB_VENDOR_AND_INTERFACE_INFO(0x0a5c, 0xff, 0x01, 0x01), |
114 | .driver_info = BTUSB_BCM_PATCHRAM }, | 115 | .driver_info = BTUSB_BCM_PATCHRAM }, |
115 | 116 | ||
117 | /* ASUSTek Computer - Broadcom based */ | ||
118 | { USB_VENDOR_AND_INTERFACE_INFO(0x0b05, 0xff, 0x01, 0x01) }, | ||
119 | |||
116 | /* Belkin F8065bf - Broadcom based */ | 120 | /* Belkin F8065bf - Broadcom based */ |
117 | { USB_VENDOR_AND_INTERFACE_INFO(0x050d, 0xff, 0x01, 0x01) }, | 121 | { USB_VENDOR_AND_INTERFACE_INFO(0x050d, 0xff, 0x01, 0x01) }, |
118 | 122 | ||
@@ -242,6 +246,10 @@ static const struct usb_device_id blacklist_table[] = { | |||
242 | { USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL }, | 246 | { USB_DEVICE(0x8087, 0x07dc), .driver_info = BTUSB_INTEL }, |
243 | { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL }, | 247 | { USB_DEVICE(0x8087, 0x0a2a), .driver_info = BTUSB_INTEL }, |
244 | 248 | ||
249 | /* Marvell device */ | ||
250 | { USB_DEVICE(0x1286, 0x2044), .driver_info = BTUSB_MARVELL }, | ||
251 | { USB_DEVICE(0x1286, 0x2046), .driver_info = BTUSB_MARVELL }, | ||
252 | |||
245 | { } /* Terminating entry */ | 253 | { } /* Terminating entry */ |
246 | }; | 254 | }; |
247 | 255 | ||
@@ -1455,6 +1463,29 @@ static int btusb_set_bdaddr_intel(struct hci_dev *hdev, const bdaddr_t *bdaddr) | |||
1455 | return 0; | 1463 | return 0; |
1456 | } | 1464 | } |
1457 | 1465 | ||
1466 | static int btusb_set_bdaddr_marvell(struct hci_dev *hdev, | ||
1467 | const bdaddr_t *bdaddr) | ||
1468 | { | ||
1469 | struct sk_buff *skb; | ||
1470 | u8 buf[8]; | ||
1471 | long ret; | ||
1472 | |||
1473 | buf[0] = 0xfe; | ||
1474 | buf[1] = sizeof(bdaddr_t); | ||
1475 | memcpy(buf + 2, bdaddr, sizeof(bdaddr_t)); | ||
1476 | |||
1477 | skb = __hci_cmd_sync(hdev, 0xfc22, sizeof(buf), buf, HCI_INIT_TIMEOUT); | ||
1478 | if (IS_ERR(skb)) { | ||
1479 | ret = PTR_ERR(skb); | ||
1480 | BT_ERR("%s: changing Marvell device address failed (%ld)", | ||
1481 | hdev->name, ret); | ||
1482 | return ret; | ||
1483 | } | ||
1484 | kfree_skb(skb); | ||
1485 | |||
1486 | return 0; | ||
1487 | } | ||
1488 | |||
1458 | #define BDADDR_BCM20702A0 (&(bdaddr_t) {{0x00, 0xa0, 0x02, 0x70, 0x20, 0x00}}) | 1489 | #define BDADDR_BCM20702A0 (&(bdaddr_t) {{0x00, 0xa0, 0x02, 0x70, 0x20, 0x00}}) |
1459 | 1490 | ||
1460 | static int btusb_setup_bcm_patchram(struct hci_dev *hdev) | 1491 | static int btusb_setup_bcm_patchram(struct hci_dev *hdev) |
@@ -1766,6 +1797,9 @@ static int btusb_probe(struct usb_interface *intf, | |||
1766 | hdev->set_bdaddr = btusb_set_bdaddr_intel; | 1797 | hdev->set_bdaddr = btusb_set_bdaddr_intel; |
1767 | } | 1798 | } |
1768 | 1799 | ||
1800 | if (id->driver_info & BTUSB_MARVELL) | ||
1801 | hdev->set_bdaddr = btusb_set_bdaddr_marvell; | ||
1802 | |||
1769 | if (id->driver_info & BTUSB_INTEL_BOOT) | 1803 | if (id->driver_info & BTUSB_INTEL_BOOT) |
1770 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); | 1804 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); |
1771 | 1805 | ||