All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: MGMT: Clear disabled connection parameters when loading none
@ 2026-10-29 20:28 Kevin Dewald
  2026-10-30  0:13 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Dewald @ 2026-10-29 20:28 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, linux-kernel,
	Kevin Dewald

Load Connection Parameters only clears the disabled connection
parameters when it loads more than one entry, so that loading a single
entry can update the parameters of one device without dropping the
others. Loading no entries does not clear them either, though, which is
what bluetoothd does when it starts without stored connection
parameters.

Pair Device adds disabled connection parameters for the device it pairs
with, so these now survive bluetoothd restarts, and new connections to
the device keep using the parameters they were created with instead of
the defaults set since, e.g. the connection interval from main.conf.

Clear the disabled connection parameters unless a single entry is
loaded, as was done for any number of entries before.

Fixes: 0ece498c27d8 ("Bluetooth: MGMT: Make MGMT_OP_LOAD_CONN_PARAM update existing connection")
Assisted-by: Claude:claude-opus-5.5
Signed-off-by: Kevin Dewald <kevin@simpleble.org>
---
Found with the BlueZ functional tests, which run one after another on
the same VMs: after test_bearer_le_pair, the next LE connection between
the two hosts kept the parameters the pairing had added.

Reproduced in test-runner: host0 pairs with host1, then bluetoothd is
restarted on host0 with MinConnectionInterval and MaxConnectionInterval
of 80 (100 ms) in main.conf and connects to host1 again. Without this
patch LE Extended Create Connection asks for 30 to 50 ms (3 of 3 runs),
with it for 100 ms (3 of 3). Without the earlier pairing it asks for
100 ms either way. The kernel testers pass as before. Only tested with
the emulator.

 net/bluetooth/mgmt.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 3cb4f9ece8..cf5256f4a8 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -8175,7 +8175,11 @@ static int load_conn_param(struct sock *sk, struct hci_dev *hdev, void *data,
 
 	hci_dev_lock(hdev);
 
-	if (param_count > 1)
+	/* A single entry may be an update for one device, so keep the other
+	 * disabled parameters then, but clear them otherwise, including when
+	 * no entries are loaded.
+	 */
+	if (param_count != 1)
 		hci_conn_params_clear_disabled(hdev);
 
 	for (i = 0; i < param_count; i++) {

base-commit: 1081a6ef8f1e0661fd52eb3f878691b0b96cdff9
-- 
2.53.0


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

* RE: Bluetooth: MGMT: Clear disabled connection parameters when loading none
  2026-10-29 20:28 [PATCH] Bluetooth: MGMT: Clear disabled connection parameters when loading none Kevin Dewald
@ 2026-10-30  0:13 ` bluez.test.bot
  0 siblings, 0 replies; 2+ messages in thread
From: bluez.test.bot @ 2026-10-30  0:13 UTC (permalink / raw)
  To: linux-bluetooth, kevin

[-- Attachment #1: Type: text/plain, Size: 1127 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/1196594/

---Test result---

Test Summary:
CheckPatch                    PASS      0.54 seconds
VerifyFixes                   PASS      0.88 seconds
VerifySignedoff               PASS      0.20 seconds
GitLint                       PASS      0.29 seconds
SubjectPrefix                 PASS      0.10 seconds
BuildKernel                   PASS      20.74 seconds
CheckAllWarning               PASS      22.82 seconds
CheckSparse                   PASS      25.29 seconds
BuildKernel32                 PASS      27.67 seconds
CheckKernelLLVM               PASS      21.46 seconds
TestRunnerSetup               PASS      466.36 seconds
TestRunner_mgmt-tester        PASS      82.60 seconds
TestRunner_mesh-tester        PASS      9.94 seconds
IncrementalBuild              PASS      22.36 seconds



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

---
Regards,
Linux Bluetooth


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

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29 20:28 [PATCH] Bluetooth: MGMT: Clear disabled connection parameters when loading none Kevin Dewald
2026-10-30  0:13 ` bluez.test.bot

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.