diff mbox series

[1/2] Bluetooth: hci_sync: Fix not updating privacy_mode

Message ID 20220714002236.3540353-1-luiz.dentz@gmail.com
State New
Headers show
Series [1/2] Bluetooth: hci_sync: Fix not updating privacy_mode | expand

Commit Message

Luiz Augusto von Dentz July 14, 2022, 12:22 a.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

When programming a new entry into the resolving list it shall default
to network mode since the params may contain the mode programmed when
the device was last added to the resolving list.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
---
 net/bluetooth/hci_sync.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index ca97378fd81f..9f44537db348 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -1636,6 +1636,9 @@  static int hci_le_add_resolve_list_sync(struct hci_dev *hdev,
 	bacpy(&cp.bdaddr, &params->addr);
 	memcpy(cp.peer_irk, irk->val, 16);
 
+	/* Default privacy mode is always 0x00 (Network) */
+	params->privacy_mode = 0x00;
+
 done:
 	if (hci_dev_test_flag(hdev, HCI_PRIVACY))
 		memcpy(cp.local_irk, hdev->irk, 16);