With this patch it is possible to initiate new connection when there are already connections in slave role present. This requires support in the controller so need to check LE supported stated bit mask. Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@xxxxxxxxxxx> --- net/bluetooth/hci_event.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 609fd6871c5a..d3ac83be0427 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -5072,10 +5072,11 @@ static struct hci_conn *check_pending_le_conn(struct hci_dev *hdev, if (hci_bdaddr_list_lookup(&hdev->blacklist, addr, addr_type)) return NULL; - /* Most controller will fail if we try to create new connections - * while we have an existing one in slave role. + /* If we have existing connection in slave role, check if controller + * supports Initiating State and Connection State (Slave Role) states + * combination (bit #41 in states mask). */ - if (hdev->conn_hash.le_num_slave > 0) + if (hdev->conn_hash.le_num_slave > 0 && !(hdev->le_states[5] & 0x02)) return NULL; /* If we're not connectable only connect devices that we have in -- 2.20.1