aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-12-03 14:07:22 -0800
committerMarcel Holtmann <marcel@holtmann.org>2021-12-07 17:05:51 +0100
commit6126ffabba6b415bd6bf3e1b091ef074e86765c6 (patch)
tree4670d10bd18cbc5964390af4a1dbc2516d3a70f7 /include/net/bluetooth
parentBluetooth: btusb: Add support for queuing during polling interval (diff)
downloadlinux-dev-6126ffabba6b415bd6bf3e1b091ef074e86765c6.tar.xz
linux-dev-6126ffabba6b415bd6bf3e1b091ef074e86765c6.zip
Bluetooth: Introduce HCI_CONN_FLAG_DEVICE_PRIVACY device flag
This introduces HCI_CONN_FLAG_DEVICE_PRIVACY which can be used by userspace to indicate to the controller to use Device Privacy Mode to a specific device. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci_core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index d1b67755a373..cf24af649c7f 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -154,6 +154,7 @@ struct bdaddr_list_with_irk {
enum hci_conn_flags {
HCI_CONN_FLAG_REMOTE_WAKEUP,
+ HCI_CONN_FLAG_DEVICE_PRIVACY,
__HCI_CONN_NUM_FLAGS,
};
@@ -1466,6 +1467,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn);
#define use_ll_privacy(dev) (ll_privacy_capable(dev) && \
hci_dev_test_flag(dev, HCI_ENABLE_LL_PRIVACY))
+#define privacy_mode_capable(dev) (use_ll_privacy(dev) && \
+ (hdev->commands[39] & 0x04))
+
/* Use enhanced synchronous connection if command is supported */
#define enhanced_sco_capable(dev) ((dev)->commands[29] & 0x08)