summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAndre Guedes2014-07-01 23:10:10 +0200
committerMarcel Holtmann2014-07-03 17:42:55 +0200
commit662bc2e63de765bb701e3d3eca6af9fe553d72ac (patch)
tree7645147a3ebe1edbaebf85ce1a92a4a25df12e72 /net
parentBluetooth: Move LE event mask setting into init3 phase (diff)
downloadkernel-qcow2-linux-662bc2e63de765bb701e3d3eca6af9fe553d72ac.tar.gz
kernel-qcow2-linux-662bc2e63de765bb701e3d3eca6af9fe553d72ac.tar.xz
kernel-qcow2-linux-662bc2e63de765bb701e3d3eca6af9fe553d72ac.zip
Bluetooth: Enable new LE meta event
The Bluetooth 4.1 introduces a new LE meta event called "LE Remote Connection Parameter Request" event. In order to the controller sends this event to host, we should enable it during controller initialization. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5788e031b869..615d0cf5e511 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1611,6 +1611,15 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
memset(events, 0, sizeof(events));
events[0] = 0x1f;
+
+ /* If controller supports the Connection Parameters Request
+ * Link Layer Procedure, enable the corresponding event.
+ */
+ if (hdev->le_features[0] & HCI_LE_CONN_PARAM_REQ_PROC)
+ events[0] |= 0x20; /* LE Remote Connection
+ * Parameter Request
+ */
+
hci_req_add(req, HCI_OP_LE_SET_EVENT_MASK, sizeof(events),
events);