summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_sync.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-02-07 15:26:20 -0500
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2024-03-06 17:22:41 -0500
commitbf98feea5b65ced367a871cf35fc044dedbcfb85 (patch)
treec44d727a2f4cc8818da5a07995a932002cf7e076 /net/bluetooth/hci_sync.c
parentf4b0c2b4cd78b75acde56c2ee5aa732b6fb2a6a9 (diff)
Bluetooth: hci_conn: Always use sk_timeo as conn_timeout
This aligns the use socket sk_timeo as conn_timeout when initiating a connection and then use it when scheduling the resulting HCI command, that way the command is actually aborted synchronously thus not blocking commands generated by hci_abort_conn_sync to inform the controller the connection is to be aborted. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Diffstat (limited to 'net/bluetooth/hci_sync.c')
-rw-r--r--net/bluetooth/hci_sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 617407b81ffe..788a889210d8 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -6548,7 +6548,7 @@ static int __hci_acl_create_connection_sync(struct hci_dev *hdev, void *data)
err = __hci_cmd_sync_status_sk(hdev, HCI_OP_CREATE_CONN,
sizeof(cp), &cp,
HCI_EV_CONN_COMPLETE,
- HCI_ACL_CONN_TIMEOUT, NULL);
+ conn->conn_timeout, NULL);
if (err == -ETIMEDOUT)
hci_abort_conn_sync(hdev, conn, HCI_ERROR_LOCAL_HOST_TERM);