archive mirror
 help / color / mirror / Atom feed
From: Ahmad Fatoum <>
To: Marcel Holtmann <>,
	Johan Hedberg <>,
	Luiz Augusto von Dentz <>,
	"David S. Miller" <>,
	Eric Dumazet <>,
	Jakub Kicinski <>, Paolo Abeni <>
Cc: Ahmad Fatoum <>,,,,
Subject: [PATCH] Bluetooth: hci_sync: complete LE connection on any event
Date: Thu, 16 Jun 2022 11:24:20 +0200	[thread overview]
Message-ID: <> (raw)

Commit 6cd29ec6ae5e ("Bluetooth: hci_sync: Wait for proper events when
connecting LE") changed HCI core to wait for specific events before
posting completion for a new LE connection. This commit introduced
regressions partially fixed in commits a56a1138cbd8
("Bluetooth: hci_sync: Fix not using conn_timeout") and
and c9f73a2178c1 ("Bluetooth: hci_conn: Fix hci_connect_le_sync").

Yet, a regression still remains where devices that worked previously
now timeout[1][2]. Restore working order by reverting the commit in
question until this issue can be properly resolved.


Fixes: 6cd29ec6ae5e ("Bluetooth: hci_sync: Wait for proper events when connecting LE")
Signed-off-by: Ahmad Fatoum <>
Event callbacks like hci_le_meta_evt() use hci_skb_event(hdev->sent_cmd)
for matching. I suspect the timeout is due to intermittent frames,
e.g. because of remote unpairing, replacing the sent_cmd and thus
breaking renewed pairing as the frames couldn't be matched. This is too
complex for me to fix and we have been carrying this fix for a month now,
so I think it's best we revert this upstream for now.

#regzb Link:
 net/bluetooth/hci_sync.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index 286d6767f017..4cecf15922d4 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -5272,7 +5272,7 @@ static int hci_le_ext_create_conn_sync(struct hci_dev *hdev,
 	return __hci_cmd_sync_status_sk(hdev, HCI_OP_LE_EXT_CREATE_CONN,
 					plen, data,
+					0,
 					conn->conn_timeout, NULL);
@@ -5366,9 +5366,7 @@ int hci_le_create_conn_sync(struct hci_dev *hdev, struct hci_conn *conn)
 	err = __hci_cmd_sync_status_sk(hdev, HCI_OP_LE_CREATE_CONN,
 				       sizeof(cp), &cp,
-				       use_enhanced_conn_complete(hdev) ?
+				       0,
 				       conn->conn_timeout, NULL);

             reply	other threads:[~2022-06-16  9:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16  9:24 Ahmad Fatoum [this message]
2022-06-16 10:03 ` Bluetooth: hci_sync: complete LE connection on any event
2022-06-19 11:57 ` [PATCH] " Thorsten Leemhuis
2022-06-20  9:58   ` Ahmad Fatoum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).