summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-03-21 00:16:36 (GMT)
committerJohan Hedberg <johan.hedberg@intel.com>2015-03-21 06:03:15 (GMT)
commit15c32c5ff2d41dcf368e02607639843905b6db1a (patch)
tree2016cd93a4bd2a036cda92970cab2d0e4a3debfe /drivers
parentb55d1abf568cdf12d148ced8b82b217bff824885 (diff)
downloadlinux-15c32c5ff2d41dcf368e02607639843905b6db1a.tar.xz
Bluetooth: Read Verbose Config Version Info for Broadcom devices
The Broadcom devices expose their chip id via Read Verbose Config Version Info command. While this information is not used at the moment, it might be useful for debugging purposes and so read it before patching the firmware. This makes it show up in dmesg and HCI traces taken for the system. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/bluetooth/btusb.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 708b657..1521dad 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2458,6 +2458,25 @@ static int btusb_setup_bcm_patchram(struct hci_dev *hdev)
subver = le16_to_cpu(ver->lmp_subver);
kfree_skb(skb);
+ /* Read Verbose Config Version Info */
+ skb = __hci_cmd_sync(hdev, 0xfc79, 0, NULL, HCI_INIT_TIMEOUT);
+ if (IS_ERR(skb)) {
+ ret = PTR_ERR(skb);
+ BT_ERR("%s: BCM: Read Verbose Version failed (%ld)",
+ hdev->name, ret);
+ return ret;
+ }
+
+ if (skb->len != 7) {
+ BT_ERR("%s: BCM: Read Verbose Version event length mismatch",
+ hdev->name);
+ kfree_skb(skb);
+ return -EIO;
+ }
+
+ BT_INFO("%s: BCM: chip id %u", hdev->name, skb->data[1]);
+ kfree_skb(skb);
+
for (i = 0; bcm_subver_table[i].name; i++) {
if (subver == bcm_subver_table[i].subver) {
hw_name = bcm_subver_table[i].name;