summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth/btbcm.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2015-10-03 06:01:08 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2015-10-05 03:28:41 -0400
commitb224d3ff717cc3af91a4ec74d863a176d79331af (patch)
tree6df254b6111d244d4ea5d0041238100dad03c727 /drivers/bluetooth/btbcm.c
parentd06f107bcd828a6c3ecd4a7d449d5d0c0dba0326 (diff)
Bluetooth: btbcm: Send HCI Reset before sending Apple specific commands
The commit 7bee8b08c428 allows the Read Verbose Config Info to fail gracefully and not cause the controller setup to abort. It seems the reason that command failed in the first place was the missing HCI Reset to bring the controller in full Bluetooth mode. Apple Bluetooth controllers start out in HID mode and when in that mode the Read Verbose Config Info command is not allowed. Sending HCI Reset switches the controller into full HCI mode. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth/btbcm.c')
-rw-r--r--drivers/bluetooth/btbcm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index 02ed816a18f9..ad7371da5aaa 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -475,12 +475,18 @@ EXPORT_SYMBOL_GPL(btbcm_setup_patchram);
475int btbcm_setup_apple(struct hci_dev *hdev) 475int btbcm_setup_apple(struct hci_dev *hdev)
476{ 476{
477 struct sk_buff *skb; 477 struct sk_buff *skb;
478 int err;
479
480 /* Reset */
481 err = btbcm_reset(hdev);
482 if (err)
483 return err;
478 484
479 /* Read Verbose Config Version Info */ 485 /* Read Verbose Config Version Info */
480 skb = btbcm_read_verbose_config(hdev); 486 skb = btbcm_read_verbose_config(hdev);
481 if (!IS_ERR(skb)) { 487 if (!IS_ERR(skb)) {
482 BT_INFO("%s: BCM: chip id %u build %4.4u", hdev->name, skb->data[1], 488 BT_INFO("%s: BCM: chip id %u build %4.4u", hdev->name,
483 get_unaligned_le16(skb->data + 5)); 489 skb->data[1], get_unaligned_le16(skb->data + 5));
484 kfree_skb(skb); 490 kfree_skb(skb);
485 } 491 }
486 492