提交 c21c0ea0 编写于 作者: J Johan Hedberg 提交者: Marcel Holtmann

Bluetooth: Enable RPA resolving if mgmt_set_privacy is called

A user space that supports the Set Privacy command is also expected to
be able to handle New IRK events. Therefore, set the HCI_RPA_RESOLVING
flag whenever the Set Privacy command is received.
Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
上级 473deef2
...@@ -4257,6 +4257,11 @@ static int set_privacy(struct sock *sk, struct hci_dev *hdev, void *cp_data, ...@@ -4257,6 +4257,11 @@ static int set_privacy(struct sock *sk, struct hci_dev *hdev, void *cp_data,
hci_dev_lock(hdev); hci_dev_lock(hdev);
/* If user space supports this command it is also expected to
* handle IRKs. Therefore, set the HCI_RPA_RESOLVING flag.
*/
set_bit(HCI_RPA_RESOLVING, &hdev->dev_flags);
if (cp->privacy) { if (cp->privacy) {
changed = !test_and_set_bit(HCI_PRIVACY, &hdev->dev_flags); changed = !test_and_set_bit(HCI_PRIVACY, &hdev->dev_flags);
memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); memcpy(hdev->irk, cp->irk, sizeof(hdev->irk));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册