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

Bluetooth: Enable basics for LE Data Length Extension feature

When the controller supports the new LE Data Length Extension feature
from Bluetooth 4.2 specification, enable the new events and read the
values for default and maxmimum data length supported by the controller.
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
parent 94a3bd02
...@@ -805,6 +805,12 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt) ...@@ -805,6 +805,12 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
* Parameter Request * Parameter Request
*/ */
/* If the controller supports the Data Length Extension
* feature, enable the corresponding event.
*/
if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT)
events[0] |= 0x40; /* LE Data Length Change */
/* If the controller supports Extended Scanner Filter /* If the controller supports Extended Scanner Filter
* Policies, enable the correspondig event. * Policies, enable the correspondig event.
*/ */
...@@ -835,6 +841,14 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt) ...@@ -835,6 +841,14 @@ static void hci_init3_req(struct hci_request *req, unsigned long opt)
hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL); hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);
} }
if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT) {
/* Read LE Maximum Data Length */
hci_req_add(req, HCI_OP_LE_READ_MAX_DATA_LEN, 0, NULL);
/* Read LE Suggested Default Data Length */
hci_req_add(req, HCI_OP_LE_READ_DEF_DATA_LEN, 0, NULL);
}
hci_set_le_support(req); hci_set_le_support(req);
} }
......
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