aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-12-22 12:21:59 -0800
committerMarcel Holtmann <marcel@holtmann.org>2021-12-22 23:01:35 +0100
commit4fc9857ab8c6cfe2152df3288c8cf3300b929f1a (patch)
treee06266d1052627f279fe3785f98777831e9398e2 /net/bluetooth/mgmt.c
parentBluetooth: hci_sync: Wait for proper events when connecting LE (diff)
downloadwireguard-linux-4fc9857ab8c6cfe2152df3288c8cf3300b929f1a.tar.xz
wireguard-linux-4fc9857ab8c6cfe2152df3288c8cf3300b929f1a.zip
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 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 962bb747d2cd..3326d9459dd3 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3916,10 +3916,7 @@ static int read_exp_features_info(struct sock *sk, struct hci_dev *hdev,
#endif
if (hdev) {
- if (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 */
+ if (hci_dev_le_state_simultaneous(hdev))
flags = BIT(0);
else
flags = 0;