diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-24 04:10:30 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-24 04:17:47 -0500 |
commit | c21c0ea07b30eb670be96e67199d1f984512ef96 (patch) | |
tree | f8e8a59f9852803b70e47fb8badf537f07f685fe /net/bluetooth/mgmt.c | |
parent | 473deef2c9e99c548c04c58856bdf1e271806079 (diff) |
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: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r-- | net/bluetooth/mgmt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 53b9408af16b..9865e523df20 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -4257,6 +4257,11 @@ static int set_privacy(struct sock *sk, struct hci_dev *hdev, void *cp_data, | |||
4257 | 4257 | ||
4258 | hci_dev_lock(hdev); | 4258 | hci_dev_lock(hdev); |
4259 | 4259 | ||
4260 | /* If user space supports this command it is also expected to | ||
4261 | * handle IRKs. Therefore, set the HCI_RPA_RESOLVING flag. | ||
4262 | */ | ||
4263 | set_bit(HCI_RPA_RESOLVING, &hdev->dev_flags); | ||
4264 | |||
4260 | if (cp->privacy) { | 4265 | if (cp->privacy) { |
4261 | changed = !test_and_set_bit(HCI_PRIVACY, &hdev->dev_flags); | 4266 | changed = !test_and_set_bit(HCI_PRIVACY, &hdev->dev_flags); |
4262 | memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); | 4267 | memcpy(hdev->irk, cp->irk, sizeof(hdev->irk)); |