diff mbox series

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

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

Commit Message

Luiz Augusto von Dentz July 14, 2022, 6:12 p.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.

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>
---
v2: Use HCI_NETWORK_PRIVACY instead of 0x00

 net/bluetooth/hci_sync.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

patchwork-bot+bluetooth@kernel.org July 18, 2022, 11:20 p.m. UTC | #1
Hello:

This series was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 14 Jul 2022 11:12:23 -0700 you wrote:
> 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.
> 
> 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>
> 
> [...]

Here is the summary with links:
  - [v2,1/2] Bluetooth: hci_sync: Fix not updating privacy_mode
    https://git.kernel.org/bluetooth/bluetooth-next/c/ab345b04433d
  - [v2,2/2] Bluetooth: hci_sync: Don't remove connected devices from accept list
    https://git.kernel.org/bluetooth/bluetooth-next/c/ff1688aab0d1

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index ca97378fd81f..256ece5640b7 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);