Bluetooth: hci_sync: Fix not using conn_timeout
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 17 Feb 2022 21:10:38 +0000 (13:10 -0800)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 24 Feb 2022 20:34:28 +0000 (21:34 +0100)
commita56a1138cbd85e4d565356199d60e1cb94e5a77a
tree31cdc534b40a0700f144d8df0915ac8e15397001
parent80740ebb7e1ad15ab9c11425dcd26e073f86d74b
Bluetooth: hci_sync: Fix not using conn_timeout

When using hci_le_create_conn_sync it shall wait for the conn_timeout
since the connection complete may take longer than just 2 seconds.

Also fix the masking of HCI_EV_LE_ENHANCED_CONN_COMPLETE and
HCI_EV_LE_CONN_COMPLETE so they are never both set so we can predict
which one the controller will use in case of HCI_OP_LE_CREATE_CONN.

Fixes: 6cd29ec6ae5e3 ("Bluetooth: hci_sync: Wait for proper events when connecting LE")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci_core.h
net/bluetooth/hci_sync.c