]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Bluetooth: Add Privacy flag to mgmt supported/current settings
authorJohan Hedberg <johan.hedberg@intel.com>
Sat, 22 Feb 2014 17:06:35 +0000 (19:06 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 22 Feb 2014 17:59:24 +0000 (09:59 -0800)
This patch makes sure that the Privacy flag is available in the mgmt
supported settings for all LE capable controllers and in the current
settings whenever the HCI_PRIVACY flag is set.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/mgmt.c

index 37a6c4eab881e403967e259a8255fb9a65350288..301b18a1c6a0cec9635cf12e494b205f1901d8cc 100644 (file)
@@ -390,6 +390,7 @@ static u32 get_supported_settings(struct hci_dev *hdev)
        if (lmp_le_capable(hdev)) {
                settings |= MGMT_SETTING_LE;
                settings |= MGMT_SETTING_ADVERTISING;
+               settings |= MGMT_SETTING_PRIVACY;
        }
 
        return settings;
@@ -438,6 +439,9 @@ static u32 get_current_settings(struct hci_dev *hdev)
        if (test_bit(HCI_DEBUG_KEYS, &hdev->dev_flags))
                settings |= MGMT_SETTING_DEBUG_KEYS;
 
+       if (test_bit(HCI_PRIVACY, &hdev->dev_flags))
+               settings |= MGMT_SETTING_PRIVACY;
+
        return settings;
 }