Skip to content

Commit b2cc233

Browse files
nsathish41holtmann
authored andcommitted
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 <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 5c49bcc commit b2cc233

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

include/net/bluetooth/hci.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1648,6 +1648,8 @@ struct hci_rp_le_read_resolv_list_size {
16481648

16491649
#define HCI_OP_LE_SET_ADDR_RESOLV_ENABLE 0x202d
16501650

1651+
#define HCI_OP_LE_SET_RPA_TIMEOUT 0x202e
1652+
16511653
#define HCI_OP_LE_READ_MAX_DATA_LEN 0x202f
16521654
struct hci_rp_le_read_max_data_len {
16531655
__u8 status;

net/bluetooth/hci_core.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,14 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
763763
hci_req_add(req, HCI_OP_LE_CLEAR_RESOLV_LIST, 0, NULL);
764764
}
765765

766+
if (hdev->commands[35] & 0x40) {
767+
__le16 rpa_timeout = cpu_to_le16(hdev->rpa_timeout);
768+
769+
/* Set RPA timeout */
770+
hci_req_add(req, HCI_OP_LE_SET_RPA_TIMEOUT, 2,
771+
&rpa_timeout);
772+
}
773+
766774
if (hdev->le_features[0] & HCI_LE_DATA_LEN_EXT) {
767775
/* Read LE Maximum Data Length */
768776
hci_req_add(req, HCI_OP_LE_READ_MAX_DATA_LEN, 0, NULL);

0 commit comments

Comments
 (0)