diff options
-rw-r--r-- | drivers/bluetooth/ath3k.c | 5 | ||||
-rw-r--r-- | drivers/bluetooth/btusb.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c index 6bacef368fab..a5854735bb2e 100644 --- a/drivers/bluetooth/ath3k.c +++ b/drivers/bluetooth/ath3k.c | |||
@@ -375,6 +375,11 @@ static int ath3k_probe(struct usb_interface *intf, | |||
375 | 375 | ||
376 | /* load patch and sysconfig files for AR3012 */ | 376 | /* load patch and sysconfig files for AR3012 */ |
377 | if (id->driver_info & BTUSB_ATH3012) { | 377 | if (id->driver_info & BTUSB_ATH3012) { |
378 | |||
379 | /* New firmware with patch and sysconfig files already loaded */ | ||
380 | if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x0001) | ||
381 | return -ENODEV; | ||
382 | |||
378 | ret = ath3k_load_patch(udev); | 383 | ret = ath3k_load_patch(udev); |
379 | if (ret < 0) { | 384 | if (ret < 0) { |
380 | BT_ERR("Loading patch file failed"); | 385 | BT_ERR("Loading patch file failed"); |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index c2de8951e3fb..91d13a9e8c65 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -54,6 +54,7 @@ static struct usb_driver btusb_driver; | |||
54 | #define BTUSB_BCM92035 0x10 | 54 | #define BTUSB_BCM92035 0x10 |
55 | #define BTUSB_BROKEN_ISOC 0x20 | 55 | #define BTUSB_BROKEN_ISOC 0x20 |
56 | #define BTUSB_WRONG_SCO_MTU 0x40 | 56 | #define BTUSB_WRONG_SCO_MTU 0x40 |
57 | #define BTUSB_ATH3012 0x80 | ||
57 | 58 | ||
58 | static struct usb_device_id btusb_table[] = { | 59 | static struct usb_device_id btusb_table[] = { |
59 | /* Generic Bluetooth USB device */ | 60 | /* Generic Bluetooth USB device */ |
@@ -110,7 +111,7 @@ static struct usb_device_id blacklist_table[] = { | |||
110 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, | 111 | { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE }, |
111 | 112 | ||
112 | /* Atheros 3012 with sflash firmware */ | 113 | /* Atheros 3012 with sflash firmware */ |
113 | { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_IGNORE }, | 114 | { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 }, |
114 | 115 | ||
115 | /* Atheros AR5BBU12 with sflash firmware */ | 116 | /* Atheros AR5BBU12 with sflash firmware */ |
116 | { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, | 117 | { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE }, |
@@ -914,6 +915,15 @@ static int btusb_probe(struct usb_interface *intf, | |||
914 | if (ignore_sniffer && id->driver_info & BTUSB_SNIFFER) | 915 | if (ignore_sniffer && id->driver_info & BTUSB_SNIFFER) |
915 | return -ENODEV; | 916 | return -ENODEV; |
916 | 917 | ||
918 | if (id->driver_info & BTUSB_ATH3012) { | ||
919 | struct usb_device *udev = interface_to_usbdev(intf); | ||
920 | |||
921 | /* Old firmware would otherwise let ath3k driver load | ||
922 | * patch and sysconfig files */ | ||
923 | if (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x0001) | ||
924 | return -ENODEV; | ||
925 | } | ||
926 | |||
917 | data = kzalloc(sizeof(*data), GFP_KERNEL); | 927 | data = kzalloc(sizeof(*data), GFP_KERNEL); |
918 | if (!data) | 928 | if (!data) |
919 | return -ENOMEM; | 929 | return -ENOMEM; |