Skip to content

Commit 662bc2e

Browse files
Andre Guedesholtmann
authored andcommitted
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>
1 parent 9193c6e commit 662bc2e

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

‎include/net/bluetooth/hci.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,9 @@ enum {
307307
#define LMP_HOST_LE_BREDR 0x04
308308
#define LMP_HOST_SC 0x08
309309

310+
/* LE features */
311+
#define HCI_LE_CONN_PARAM_REQ_PROC 0x02
312+
310313
/* Connection modes */
311314
#define HCI_CM_ACTIVE 0x0000
312315
#define HCI_CM_HOLD 0x0001

‎net/bluetooth/hci_core.c‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,15 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
16111611

16121612
memset(events, 0, sizeof(events));
16131613
events[0] = 0x1f;
1614+
1615+
/* If controller supports the Connection Parameters Request
1616+
* Link Layer Procedure, enable the corresponding event.
1617+
*/
1618+
if (hdev->le_features[0] & HCI_LE_CONN_PARAM_REQ_PROC)
1619+
events[0] |= 0x20; /* LE Remote Connection
1620+
* Parameter Request
1621+
*/
1622+
16141623
hci_req_add(req, HCI_OP_LE_SET_EVENT_MASK, sizeof(events),
16151624
events);
16161625

0 commit comments

Comments
 (0)