Skip to contentSkip to conversation

Bluetooth: Enable RPA resolving if mgmt_set_privacy is called

PATCH In review [email protected] 2 participants 2 messages Feb 24, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Bluetooth: Enable RPA resolving if mgmt_set_privacy is called

From: Johan Hedberg <[email protected]>

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.

---
 net/bluetooth/mgmt.c | 5 +++++
 1 file changed, 5 insertions(+)
net/bluetooth/mgmt.c +5 -0
index 53b9408af16b..9865e523df20 100644
@@ -4257,6 +4257,11 @@ static int set_privacy(struct sock *sk, struct hci_dev *hdev, void *cp_data,
 
 	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) {
 		changed = !test_and_set_bit(HCI_PRIVACY, &hdev->dev_flags);
 		memcpy(hdev->irk, cp->irk, sizeof(hdev->irk));
Signature · 1 line
1.8.5.3
maintainer
#1 lore raw

Hi Johan,

Quoted 8 lines

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.

---
net/bluetooth/mgmt.c | 5 +++++

1 file changed, 5 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel