Skip to content

Commit d03c759

Browse files
nsathish41holtmann
authored andcommitted
Bluetooth: Let controller creates RPA during le create conn
When address resolution is enabled and set_privacy is enabled let's use own address type as 0x03 Signed-off-by: Sathish Narasimman <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent b31bc00 commit d03c759

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

net/bluetooth/hci_request.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2242,7 +2242,13 @@ int hci_update_random_address(struct hci_request *req, bool require_privacy,
22422242
if (use_rpa) {
22432243
int to;
22442244

2245-
*own_addr_type = ADDR_LE_DEV_RANDOM;
2245+
/* If Controller supports LL Privacy use own address type is
2246+
* 0x03
2247+
*/
2248+
if (use_ll_privacy(hdev))
2249+
*own_addr_type = ADDR_LE_DEV_RANDOM_RESOLVED;
2250+
else
2251+
*own_addr_type = ADDR_LE_DEV_RANDOM;
22462252

22472253
if (!hci_dev_test_and_clear_flag(hdev, HCI_RPA_EXPIRED) &&
22482254
!bacmp(&hdev->random_addr, &hdev->rpa))

0 commit comments

Comments
 (0)