[PATCH v4 0/2] Bluetooth: fix bonded LE peripheral reconnect completion and holds

From: Andrei A. Bykov

Date: Wed Nov 25 2026 - 08:09:15 EST


This series fixes two issues in the Bluetooth HCI layer seen when a
bonded Windows central reconnects to a Linux LE HID peripheral.

Changes since v3:
- Rebase onto bluetooth-next at f57f78086ab5. IncrementalBuild reset to
origin/master, where the newly added MT7922 data-length block changed
the context of patch 2. Keep that block intact and apply the same LE
setup check below it. Patch 1 is unchanged.

Changes since v2:
- Rebase onto bluetooth-next at 6a40daae69b0. The Bluetooth CI bot
could not apply v2 because the key-refresh configuration code moved
into hci_conn_refresh_key(). Update that shared helper in patch 2 so
both Key Refresh Complete event formats use the same path.
- Preserve the LE setup abort checks in both feature-complete handlers
on the new base. Patch 1 has no functional changes.

Changes since v1:
- Refresh the saved synchronous request after timeout or cancellation,
preserving socket references across controller reset resends.
- Keep the LE feature hold across encryption and key refresh. Explicitly
abort failed setup and prevent later events from reporting success.

Both v4 patches apply in order with git am on the pinned bluetooth-next
base and the GitHub workflow branch used by Bluetooth CI. I reproduced
the IncrementalBuild sequence on f57f78086ab5 using BlueZ's ci.config:
make olddefconfig, then git am and make net/bluetooth/ drivers/bluetooth/
after each patch. Both builds passed. Local model tests pass 152
command-dispatch checks and 66 connection-lifetime checks with GCC,
Clang and ASan/UBSan, including checks for the MT7922 path.

The v2 backport to Linux 7.3.5 passed repeated bonded reconnects,
approximately seven hours without observed connection loss, and Windows
Bluetooth off/on. Those hardware results are from v2. In separate
Windows suspend/resume attempts, the test HID application could still
wait for an HID subscription after BlueZ reported a connection.

OpenAI Codex assisted with analysis, patch preparation and tests.
Sashiko provided the findings addressed in v2.

v1: https://lore.kernel.org/r/20261121033104.441146-1-andreiab9019@xxxxxxxxx
v2: https://lore.kernel.org/r/20261124140956.15296-1-andreiab9019@xxxxxxxxx
v2 CI: https://patchwork.kernel.org/comment/27404265/
v3: https://lore.kernel.org/r/20261124211127.41609-1-andreiab9019@xxxxxxxxx
v3 CI: https://github.com/bluez/bluetooth-next/pull/1221#issuecomment-7151355640

Andrei A. Bykov (2):
Bluetooth: hci_sync: keep unrelated replies away from event waiters
Bluetooth: hci_core: preserve LE feature holds across encryption
events

include/net/bluetooth/hci_core.h | 9 +++++++-
net/bluetooth/hci_core.c | 16 +++++++++++++-
net/bluetooth/hci_event.c | 36 +++++++++++++++++++++++++-------
3 files changed, 52 insertions(+), 9 deletions(-)


base-commit: f57f78086ab54f3b3122fbaeba2c842ba7bb6d00
--
2.56.1