Bluetooth: add support for 2011 mac mini
[firefly-linux-kernel-4.4.55.git] / drivers / bluetooth / btusb.c
index 762a5109c68ac24c3c6e83cb462429059528ebac..ffda6c82a541e3324e49cbee9075cd749ec4868b 100644 (file)
@@ -54,6 +54,7 @@ static struct usb_driver btusb_driver;
 #define BTUSB_BCM92035         0x10
 #define BTUSB_BROKEN_ISOC      0x20
 #define BTUSB_WRONG_SCO_MTU    0x40
+#define BTUSB_ATH3012          0x80
 
 static struct usb_device_id btusb_table[] = {
        /* Generic Bluetooth USB device */
@@ -71,9 +72,15 @@ static struct usb_device_id btusb_table[] = {
        /* Apple MacBookAir3,1, MacBookAir3,2 */
        { USB_DEVICE(0x05ac, 0x821b) },
 
+       /* Apple MacBookAir4,1 */
+       { USB_DEVICE(0x05ac, 0x821f) },
+
        /* Apple MacBookPro8,2 */
        { USB_DEVICE(0x05ac, 0x821a) },
 
+       /* Apple MacMini5,1 */
+       { USB_DEVICE(0x05ac, 0x8281) },
+
        /* AVM BlueFRITZ! USB v2.0 */
        { USB_DEVICE(0x057c, 0x3800) },
 
@@ -104,12 +111,14 @@ static struct usb_device_id blacklist_table[] = {
 
        /* Atheros 3011 with sflash firmware */
        { USB_DEVICE(0x0cf3, 0x3002), .driver_info = BTUSB_IGNORE },
+       { USB_DEVICE(0x13d3, 0x3304), .driver_info = BTUSB_IGNORE },
+       { USB_DEVICE(0x0930, 0x0215), .driver_info = BTUSB_IGNORE },
 
        /* Atheros AR9285 Malbec with sflash firmware */
        { USB_DEVICE(0x03f0, 0x311d), .driver_info = BTUSB_IGNORE },
 
        /* Atheros 3012 with sflash firmware */
-       { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_IGNORE },
+       { USB_DEVICE(0x0cf3, 0x3004), .driver_info = BTUSB_ATH3012 },
 
        /* Atheros AR5BBU12 with sflash firmware */
        { USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
@@ -913,6 +922,15 @@ static int btusb_probe(struct usb_interface *intf,
        if (ignore_sniffer && id->driver_info & BTUSB_SNIFFER)
                return -ENODEV;
 
+       if (id->driver_info & BTUSB_ATH3012) {
+               struct usb_device *udev = interface_to_usbdev(intf);
+
+               /* Old firmware would otherwise let ath3k driver load
+                * patch and sysconfig files */
+               if (le16_to_cpu(udev->descriptor.bcdDevice) <= 0x0001)
+                       return -ENODEV;
+       }
+
        data = kzalloc(sizeof(*data), GFP_KERNEL);
        if (!data)
                return -ENOMEM;