]> www.infradead.org Git - users/hch/misc.git/commitdiff
Bluetooth: MGMT: Add LL Privacy Setting
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 21 Mar 2025 19:42:16 +0000 (15:42 -0400)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Mar 2025 19:22:49 +0000 (15:22 -0400)
This adds LL Privacy (bit 22) to Read Controller Information so the likes
of bluetoothd(1) can detect when the controller supports it or not.

Fixes: e209e5ccc5ac ("Bluetooth: MGMT: Mark LL Privacy as stable")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/mgmt.h
net/bluetooth/mgmt.c

index affac861efdc5841eb97fd0ccc1f3fc2dbc3e6fb..3575cd16049a88051a0c1762f19f520f6d515568 100644 (file)
@@ -113,6 +113,7 @@ struct mgmt_rp_read_index_list {
 #define MGMT_SETTING_CIS_PERIPHERAL    BIT(19)
 #define MGMT_SETTING_ISO_BROADCASTER   BIT(20)
 #define MGMT_SETTING_ISO_SYNC_RECEIVER BIT(21)
+#define MGMT_SETTING_LL_PRIVACY                BIT(22)
 
 #define MGMT_OP_READ_INFO              0x0004
 #define MGMT_READ_INFO_SIZE            0
index 4fd30ba243be5fb8b68188c8fd9d1235fd24e1d2..c1e1e529e26cc2061e218fd9f292a6e25629b362 100644 (file)
@@ -851,6 +851,9 @@ static u32 get_supported_settings(struct hci_dev *hdev)
        if (cis_peripheral_capable(hdev))
                settings |= MGMT_SETTING_CIS_PERIPHERAL;
 
+       if (ll_privacy_capable(hdev))
+               settings |= MGMT_SETTING_LL_PRIVACY;
+
        settings |= MGMT_SETTING_PHY_CONFIGURATION;
 
        return settings;
@@ -933,6 +936,9 @@ static u32 get_current_settings(struct hci_dev *hdev)
        if (sync_recv_capable(hdev))
                settings |= MGMT_SETTING_ISO_SYNC_RECEIVER;
 
+       if (ll_privacy_capable(hdev))
+               settings |= MGMT_SETTING_LL_PRIVACY;
+
        return settings;
 }