aboutsummaryrefslogtreecommitdiff
path: root/net/bluetooth
diff options
context:
space:
mode:
authorGravatar Luiz Augusto von Dentz <luiz.von.dentz@intel.com> 2022-07-13 17:12:14 -0700
committerGravatar Luiz Augusto von Dentz <luiz.von.dentz@intel.com> 2022-07-21 17:09:19 -0700
commit0900b1c62f43e495d04ca4bebdf80b34f3c12432 (patch)
treedb53d4ed0d014b2f410af7bf2e2f4fa49754dffa /net/bluetooth
parentBluetooth: Collect kcov coverage from hci_rx_work (diff)
downloadlinux-0900b1c62f43e495d04ca4bebdf80b34f3c12432.tar.gz
linux-0900b1c62f43e495d04ca4bebdf80b34f3c12432.tar.bz2
linux-0900b1c62f43e495d04ca4bebdf80b34f3c12432.zip
Bluetooth: hci_sync: Fix not updating privacy_mode
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. Link: https://bugzilla.kernel.org/show_bug.cgi?id=209745 Fixes: 853b70b506a20 ("Bluetooth: hci_sync: Set Privacy Mode when updating the resolving list") Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Tested-by: Zhengping Jiang <jiangzp@google.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_sync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 49b69fe47bec..b1eee2a146fe 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 Network */
+ params->privacy_mode = HCI_NETWORK_PRIVACY;
+
done:
if (hci_dev_test_flag(hdev, HCI_PRIVACY))
memcpy(cp.local_irk, hdev->irk, 16);