diff options
author | Alain Michaud <alainm@chromium.org> | 2020-04-23 17:43:29 +0300 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2020-04-28 12:49:12 +0300 |
commit | 4364f2e91f0d44fa0e233d2a55e3ec35053d9bd9 (patch) | |
tree | f28e24e43011de934bce040acae47cbc3353ad60 | |
parent | 220915857e29795ae5ba4222806268b4a99c19c1 (diff) | |
download | linux-4364f2e91f0d44fa0e233d2a55e3ec35053d9bd9.tar.xz |
Bluetooth: allow scatternet connections if supported.
This change allows scatternet connections to be created if the
controller reports support and the HCI_QUIRK_VALID_LE_STATES indicates
that the reported LE states can be trusted.
Signed-off-by: Alain Michaud <alainm@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r-- | net/bluetooth/hci_event.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 966fc543c01d..006c24e04b44 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5288,7 +5288,9 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev, /* Most controller will fail if we try to create new connections * while we have an existing one in slave role. */ - if (hdev->conn_hash.le_num_slave > 0) + if (hdev->conn_hash.le_num_slave > 0 && + (!test_bit(HCI_QUIRK_VALID_LE_STATES, &hdev->quirks) || + !(hdev->le_states[3] & 0x10))) return NULL; /* If we're not connectable only connect devices that we have in |