Linux bluetooth development
 help / color / mirror / Atom feed
From: "Andrei A. Bykov" <andreiab9019@gmail.com>
To: linux-bluetooth@vger.kernel.org
Cc: marcel@holtmann.org, luiz.dentz@gmail.com, linux-kernel@vger.kernel.org
Subject: [PATCH v3 0/2] Bluetooth: fix bonded LE peripheral reconnect completion and holds
Date: Tue, 24 Nov 2026 18:11:25 -0300	[thread overview]
Message-ID: <20261124211127.41609-1-andreiab9019@gmail.com> (raw)

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 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 v3 patches apply in order with git am on the pinned bluetooth-next
base and the GitHub workflow branch used by Bluetooth CI. Local model
tests pass 152 command-dispatch checks and 62 connection-lifetime checks
with GCC, Clang and ASan/UBSan.

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@gmail.com
v2: https://lore.kernel.org/r/20261124140956.15296-1-andreiab9019@gmail.com
v2 CI: https://patchwork.kernel.org/comment/27404265/

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: 6a40daae69b0c45d4f8b6aa247fca165b8534f60
-- 
2.56.1


             reply	other threads:[~2026-11-24 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24 21:11 Andrei A. Bykov [this message]
2026-11-24 21:11 ` [PATCH v3 1/2] Bluetooth: hci_sync: keep unrelated replies away from event waiters Andrei A. Bykov
2026-11-24 21:11 ` [PATCH v3 2/2] Bluetooth: hci_core: preserve LE feature holds across encryption events Andrei A. Bykov

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=20261124211127.41609-1-andreiab9019@gmail.com \
    --to=andreiab9019@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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