Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs
@ 2026-10-13  3:13 Kyle Pepper
  2026-10-13  4:29 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Kyle Pepper @ 2026-10-13  3:13 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marcel Holtmann, Luiz Augusto von Dentz, linux-kernel

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, &params[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, &params[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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs
  2026-10-13  3:13 [PATCH] Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs Kyle Pepper
@ 2026-10-13  4:29 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-10-13  4:29 UTC (permalink / raw)
  To: linux-bluetooth, cochcoder

[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1184325/

---Test result---

Test Summary:
CheckPatch                    PASS      0.57 seconds
VerifyFixes                   PASS      0.07 seconds
VerifySignedoff               PASS      0.06 seconds
GitLint                       PASS      0.21 seconds
SubjectPrefix                 PASS      0.06 seconds
BuildKernel                   PASS      29.32 seconds
CheckAllWarning               PASS      33.44 seconds
CheckSparse                   PASS      35.57 seconds
BuildKernel32                 PASS      29.06 seconds
CheckKernelLLVM               PASS      34.72 seconds
TestRunnerSetup               PASS      695.31 seconds
TestRunner_l2cap-tester       PASS      12.71 seconds
TestRunner_iso-tester         PASS      10.63 seconds
TestRunner_bnep-tester        PASS      3.04 seconds
TestRunner_mgmt-tester        PASS      87.21 seconds
TestRunner_rfcomm-tester      PASS      4.38 seconds
TestRunner_sco-tester         PASS      5.54 seconds
TestRunner_ioctl-tester       PASS      4.57 seconds
TestRunner_mesh-tester        PASS      5.43 seconds
TestRunner_smp-tester         PASS      4.23 seconds
TestRunner_userchan-tester    PASS      3.15 seconds
TestRunner_6lowpan-tester     PASS      4.33 seconds
IncrementalBuild              PASS      34.31 seconds



https://github.com/bluez/bluetooth-next/pull/906

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-13  4:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-13  3:13 [PATCH] Bluetooth: hci_sync: scan unfiltered for host-resolved RPAs Kyle Pepper
2026-10-13  4:29 ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox