diff options
author | Sathish Narasimman <nsathish41@gmail.com> | 2020-07-23 14:39:02 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2020-07-30 09:34:43 +0200 |
commit | b2cc23398e8166b38f8715026273503b081c2a7a (patch) | |
tree | 16108eaa27e766dbca118ffa2838aa7bab8239f3 /net/bluetooth | |
parent | Bluetooth: Enable/Disable address resolution during le create conn (diff) | |
download | linux-b2cc23398e8166b38f8715026273503b081c2a7a.tar.xz linux-b2cc23398e8166b38f8715026273503b081c2a7a.zip |
Bluetooth: Enable RPA Timeout
Enable RPA timeout during bluetooth initialization.
The RPA timeout value is used from hdev, which initialized from
debug_fs
Signed-off-by: Sathish Narasimman <sathish.narasimman@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 3f89bd639860..68bfe57b6625 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -763,6 +763,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt) hci_req_add(req, HCI_OP_LE_CLEAR_RESOLV_LIST, 0, NULL); } + if (hdev->commands[35] & 0x40) { + __le16 rpa_timeout = cpu_to_le16(hdev->rpa_timeout); + + /* Set RPA timeout */ + hci_req_add(req, HCI_OP_LE_SET_RPA_TIMEOUT, 2, + &rpa_timeout); + } + 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); |