diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-12-22 12:21:59 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-12-22 23:01:35 +0100 |
commit | 4fc9857ab8c6cfe2152df3288c8cf3300b929f1a (patch) | |
tree | e06266d1052627f279fe3785f98777831e9398e2 /include/net/bluetooth | |
parent | 6cd29ec6ae5e3694b779e02da9f3e50ae4398b59 (diff) |
Bluetooth: hci_sync: Add check simultaneous roles support
This attempts to check if the controller can act as both central and
peripheral simultaneously and in case it does skip suspending
advertising or in case of directed advertising don't fail if scanning.
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.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 1ab94960764e..586f69d084a2 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -783,6 +783,12 @@ extern struct mutex hci_cb_list_lock; hci_dev_clear_flag(hdev, HCI_QUALITY_REPORT); \ } while (0) +#define hci_dev_le_state_simultaneous(hdev) \ + (test_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks) && \ + (hdev->le_states[4] & 0x08) && /* Central */ \ + (hdev->le_states[4] & 0x40) && /* Peripheral */ \ + (hdev->le_states[3] & 0x10)) /* Simultaneous */ + /* ----- HCI interface to upper protocols ----- */ int l2cap_connect_ind(struct hci_dev *hdev, bdaddr_t *bdaddr); int l2cap_disconn_ind(struct hci_conn *hcon); |