Bluetooth: hci_uart: Add diag and address support for Intel/AG6xx [Linux 4.6]

This Linux kernel change "Bluetooth: hci_uart: Add diag and address support for Intel/AG6xx" is included in the Linux 4.6 release. This change is authored by Marcel Holtmann <marcel [at]> on Sun Feb 28 21:25:19 2016 +0100. The commit for this change in Linux stable tree is 34bf191 (patch).

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 <>
Signed-off-by: Johan Hedberg <>

There are 13 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/bluetooth/hci_ag6xx.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/bluetooth/hci_ag6xx.c b/drivers/bluetooth/hci_ag6xx.c
index ea65c2d..6923d17 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 @@ static int ag6xx_setup(struct hci_uart *hu)
    /* 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 = {

Leave a Reply

Your email address will not be published. Required fields are marked *