summaryrefslogtreecommitdiff
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2016-02-28 23:25:19 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2016-02-29 20:25:22 +0300
commit34bf1912bfc06bd9200893916078eb0f16480a95 (patch)
treeac6f96b1053db968837f0f0fa7a00b4b4d6421c2 /drivers/bluetooth
parent81d90442eac779938217c3444b240aa51fd3db47 (diff)
downloadlinux-34bf1912bfc06bd9200893916078eb0f16480a95.tar.xz
Bluetooth: hci_uart: Add diag and address support for Intel/AG6xx
The AG6xx devices behave similar to Wilkens Peak and Stone Peak and with that it is needed to check for Intel default address. In addition it is possible to enable vendor events and diag support. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/hci_ag6xx.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/bluetooth/hci_ag6xx.c b/drivers/bluetooth/hci_ag6xx.c
index ea65c2d089ed..6923d17a022f 100644
--- a/drivers/bluetooth/hci_ag6xx.c
+++ b/drivers/bluetooth/hci_ag6xx.c
@@ -174,6 +174,9 @@ static int ag6xx_setup(struct hci_uart *hu)
bool patched = false;
int err;
+ hu->hdev->set_diag = btintel_set_diag;
+ hu->hdev->set_bdaddr = btintel_set_bdaddr;
+
err = btintel_enter_mfg(hdev);
if (err)
return err;
@@ -298,8 +301,16 @@ patch:
complete:
/* Exit manufacturing mode and reset */
err = btintel_exit_mfg(hdev, true, patched);
+ if (err)
+ return err;
- return err;
+ /* Set the event mask for Intel specific vendor events. This enables
+ * a few extra events that are useful during general operation.
+ */
+ btintel_set_event_mask_mfg(hdev, false);
+
+ btintel_check_bdaddr(hdev);
+ return 0;
}
static const struct hci_uart_proto ag6xx_proto = {