From: Kyle Pepper <cochcoder@proton.me>
To: linux-bluetooth@vger.kernel.org
Cc: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs
Date: Tue, 13 Oct 2026 03:13:49 +0000 [thread overview]
Message-ID: <20261013031329.483597-1-cochcoder@proton.me> (raw)
On controllers without LL Privacy, the accept list cannot match a bonded
peer identity against the peer Resolvable Private Address. Background
scans using the accept-list filter therefore hide those advertisements
from host-side address resolution and auto-connect never starts.
When a pending peer has an IRK but controller-side resolution is
unavailable, use unfiltered scanning while the host is awake. Keep
accept-list filtering during suspend, where host-side resolution cannot
run.
Assisted-by: OpenCode:gpt-6.1-sol
Signed-off-by: Kyle Pepper <cochcoder@proton.me>
---
Submission review notes (not part of the commit message):
The downstream N8/UB500 recovers an ACL link after range loss.
No patch-off comparison or changed-RPA necessity test was supplied.
Do not equate link reconnection with automatic audio/application resume.
Privacy-capable and suspend/wake regressions remain coverage gaps.
net/bluetooth/hci_sync.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c
index efbd2e538..d0fbb3e08 100644
--- a/net/bluetooth/hci_sync.c
+++ b/net/bluetooth/hci_sync.c
@@ -2907,6 +2907,7 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
struct bdaddr_list *b, *t;
u8 num_entries = 0;
bool pend_conn, pend_report;
+ bool rpa_no_llp = false;
u8 filter_policy;
size_t i, n;
int err;
@@ -3025,6 +3026,17 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
kvfree(params);
goto done;
}
+
+ /* A bonded peer that advertises with a Resolvable Private
+ * Address can only be matched by the controller's accept list
+ * if the controller can resolve addresses itself (LL Privacy).
+ * When it cannot, note the peer so the scan below can fall back
+ * to host-side resolution instead of accept list filtering.
+ */
+ if (!ll_privacy_capable(hdev) &&
+ hci_find_irk_by_addr(hdev, ¶ms[i].addr,
+ params[i].addr_type))
+ rpa_no_llp = true;
}
kvfree(params);
@@ -3047,6 +3059,11 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
kvfree(params);
goto done;
}
+
+ if (!ll_privacy_capable(hdev) &&
+ hci_find_irk_by_addr(hdev, ¶ms[i].addr,
+ params[i].addr_type))
+ rpa_no_llp = true;
}
kvfree(params);
@@ -3061,6 +3078,16 @@ static u8 hci_update_accept_list_sync(struct hci_dev *hdev)
hdev->interleave_scan_state != INTERLEAVE_SCAN_ALLOWLIST)
err = -EINVAL;
+ /* If a pending peer advertises with an RPA but the controller cannot
+ * resolve addresses (no LL Privacy), accept list filtering would drop
+ * its resolvable adverts and it could never be reconnected. Scan
+ * unfiltered instead so the host resolves the RPA in software and
+ * triggers the connection (see process_adv_report()). Skipped while
+ * suspended, where host-side resolution is not available.
+ */
+ if (rpa_no_llp && !hdev->suspended)
+ err = -EINVAL;
+
done:
filter_policy = err ? 0x00 : 0x01;
base-commit: 964430c038967fd06643e866f68115664e1a1bd1
next reply other threads:[~2026-10-13 3:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 3:13 Kyle Pepper [this message]
2026-10-13 4:29 ` Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs bluez.test.bot
2026-10-13 14:38 ` [PATCH] " Luiz Augusto von Dentz
2026-10-14 5:16 ` [PATCH v2] " Kyle Pepper
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=20261013031329.483597-1-cochcoder@proton.me \
--to=cochcoder@proton.me \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.