Commit ff3b8df2 authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Johan Hedberg

Bluetooth: Enable LE Enhanced Connection Complete event.

In case LL Privacy is supported by the controller, it is also a good
idea to use the LE Enhanced Connection Complete event for getting all
information about the new connection and its addresses.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 849c9c35
...@@ -460,6 +460,7 @@ enum { ...@@ -460,6 +460,7 @@ enum {
#define HCI_LE_SLAVE_FEATURES 0x08 #define HCI_LE_SLAVE_FEATURES 0x08
#define HCI_LE_PING 0x10 #define HCI_LE_PING 0x10
#define HCI_LE_DATA_LEN_EXT 0x20 #define HCI_LE_DATA_LEN_EXT 0x20
#define HCI_LE_LL_PRIVACY 0x40
#define HCI_LE_EXT_SCAN_POLICY 0x80 #define HCI_LE_EXT_SCAN_POLICY 0x80
#define HCI_LE_PHY_2M 0x01 #define HCI_LE_PHY_2M 0x01
#define HCI_LE_PHY_CODED 0x08 #define HCI_LE_PHY_CODED 0x08
......
...@@ -638,6 +638,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt) ...@@ -638,6 +638,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT) if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT)
events[0] |= 0x40; /* LE Data Length Change */ events[0] |= 0x40; /* LE Data Length Change */
/* If the controller supports LL Privacy feature, enable
* the corresponding event.
*/
if (hdev->le_features[0] & HCI_LE_LL_PRIVACY)
events[1] |= 0x02; /* LE Enhanced Connection
* Complete
*/
/* If the controller supports Extended Scanner Filter /* If the controller supports Extended Scanner Filter
* Policies, enable the correspondig event. * Policies, enable the correspondig event.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment