Bluetooth: btbcm: Read USB product information for Apple devices
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 18 Oct 2015 20:48:28 +0000 (22:48 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 20 Oct 2015 22:49:23 +0000 (00:49 +0200)
For the Apple Bluetooth devices, read the USB product information and
print them. This allows for easy mapping of chip and USB details.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
drivers/bluetooth/btbcm.c

index 40ad0e1ccf752c8378513ce749345d83d5b7da7a..0b697946e9bc7d91abf76b0dbfa7384fec4ce9b8 100644 (file)
@@ -527,6 +527,15 @@ int btbcm_setup_apple(struct hci_dev *hdev)
                kfree_skb(skb);
        }
 
+       /* Read USB Product Info */
+       skb = btbcm_read_usb_product(hdev);
+       if (!IS_ERR(skb)) {
+               BT_INFO("%s: BCM: product %4.4x:%4.4x", hdev->name,
+                       get_unaligned_le16(skb->data + 1),
+                       get_unaligned_le16(skb->data + 3));
+               kfree_skb(skb);
+       }
+
        /* Read Local Name */
        skb = btbcm_read_local_name(hdev);
        if (!IS_ERR(skb)) {