Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH BlueZ] adapter: Fix failed bonding attempt after LE link disconnection
@ 2026-06-08 11:10 Simon Mikuda
  2026-06-08 12:21 ` [BlueZ] " bluez.test.bot
  2026-06-10  8:20 ` [PATCH BlueZ v2] " Simon Mikuda
  0 siblings, 2 replies; 5+ messages in thread
From: Simon Mikuda @ 2026-06-08 11:10 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda

What happens when issue occurs:
- device is connected to both bearers BR/EDR and LE
- bonding is requested
- LE link disconnects
- pairing keys arrive

BlueZ would finish bonding request with error and mark device as
temporary. Then it would be disconnected+removed after default
temporary timeout (30 seconds).
---
 src/adapter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index 03593d962..a08847663 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -8622,7 +8622,9 @@ static void dev_disconnected(struct btd_adapter *adapter,
 		disconnect_notify(device, reason);
 	}
 
-	bonding_attempt_complete(adapter, &addr->bdaddr, addr->type,
+	/* device could be still connected to different bearer */
+	if (!btd_device_is_connected(device))
+		bonding_attempt_complete(adapter, &addr->bdaddr, addr->type,
 						MGMT_STATUS_DISCONNECTED);
 }
 
-- 
2.43.0


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

* RE: [BlueZ] adapter: Fix failed bonding attempt after LE link disconnection
  2026-06-08 11:10 [PATCH BlueZ] adapter: Fix failed bonding attempt after LE link disconnection Simon Mikuda
@ 2026-06-08 12:21 ` bluez.test.bot
  2026-06-10  8:20 ` [PATCH BlueZ v2] " Simon Mikuda
  1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-06-08 12:21 UTC (permalink / raw)
  To: linux-bluetooth, simon.mikuda

[-- Attachment #1: Type: text/plain, Size: 826 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/project/bluetooth/list/?series=1107775

---Test result---

Test Summary:
CheckPatch                    PASS      0.34 seconds
GitLint                       PASS      0.24 seconds
BuildEll                      PASS      20.11 seconds
BluezMake                     PASS      647.11 seconds
CheckSmatch                   PASS      349.98 seconds
bluezmakeextell               PASS      180.78 seconds
IncrementalBuild              PASS      652.24 seconds
ScanBuild                     PASS      1017.15 seconds



https://github.com/bluez/bluez/pull/2188

---
Regards,
Linux Bluetooth


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

* [PATCH BlueZ v2] adapter: Fix failed bonding attempt after LE link disconnection
  2026-06-08 11:10 [PATCH BlueZ] adapter: Fix failed bonding attempt after LE link disconnection Simon Mikuda
  2026-06-08 12:21 ` [BlueZ] " bluez.test.bot
@ 2026-06-10  8:20 ` Simon Mikuda
  2026-06-10 11:02   ` [BlueZ,v2] " bluez.test.bot
  2026-06-10 18:40   ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  1 sibling, 2 replies; 5+ messages in thread
From: Simon Mikuda @ 2026-06-10  8:20 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Simon Mikuda

What happens when issue occurs:
- device is connected to both bearers BR/EDR and LE
- bonding is requested
- LE link disconnects
- pairing keys arrive

BlueZ would finish bonding request with error and mark device as
temporary. Then it would be disconnected+removed after default
temporary timeout (30 seconds).
---
 src/adapter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/adapter.c b/src/adapter.c
index cc753fbd6..538f63e0a 100644
--- a/src/adapter.c
+++ b/src/adapter.c
@@ -8622,7 +8622,9 @@ static void dev_disconnected(struct btd_adapter *adapter,
 		disconnect_notify(device, reason);
 	}
 
-	bonding_attempt_complete(adapter, &addr->bdaddr, addr->type,
+	/* device could be still connected to different bearer */
+	if (!device || !btd_device_is_connected(device))
+		bonding_attempt_complete(adapter, &addr->bdaddr, addr->type,
 						MGMT_STATUS_DISCONNECTED);
 }
 
-- 
2.43.0


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

* RE: [BlueZ,v2] adapter: Fix failed bonding attempt after LE link disconnection
  2026-06-10  8:20 ` [PATCH BlueZ v2] " Simon Mikuda
@ 2026-06-10 11:02   ` bluez.test.bot
  2026-06-10 18:40   ` [PATCH BlueZ v2] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2026-06-10 11:02 UTC (permalink / raw)
  To: linux-bluetooth, simon.mikuda

[-- Attachment #1: Type: text/plain, Size: 825 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/project/bluetooth/list/?series=1109089

---Test result---

Test Summary:
CheckPatch                    PASS      5.58 seconds
GitLint                       PASS      0.33 seconds
BuildEll                      PASS      21.00 seconds
BluezMake                     PASS      619.90 seconds
CheckSmatch                   PASS      325.95 seconds
bluezmakeextell               PASS      166.15 seconds
IncrementalBuild              PASS      605.73 seconds
ScanBuild                     PASS      948.54 seconds



https://github.com/bluez/bluez/pull/2213

---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ v2] adapter: Fix failed bonding attempt after LE link disconnection
  2026-06-10  8:20 ` [PATCH BlueZ v2] " Simon Mikuda
  2026-06-10 11:02   ` [BlueZ,v2] " bluez.test.bot
@ 2026-06-10 18:40   ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2026-06-10 18:40 UTC (permalink / raw)
  To: Simon Mikuda; +Cc: linux-bluetooth

Hello:

This patch was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Wed, 10 Jun 2026 10:20:54 +0200 you wrote:
> What happens when issue occurs:
> - device is connected to both bearers BR/EDR and LE
> - bonding is requested
> - LE link disconnects
> - pairing keys arrive
> 
> BlueZ would finish bonding request with error and mark device as
> temporary. Then it would be disconnected+removed after default
> temporary timeout (30 seconds).
> 
> [...]

Here is the summary with links:
  - [BlueZ,v2] adapter: Fix failed bonding attempt after LE link disconnection
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=5d836f1c697c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2026-06-10 18:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-08 11:10 [PATCH BlueZ] adapter: Fix failed bonding attempt after LE link disconnection Simon Mikuda
2026-06-08 12:21 ` [BlueZ] " bluez.test.bot
2026-06-10  8:20 ` [PATCH BlueZ v2] " Simon Mikuda
2026-06-10 11:02   ` [BlueZ,v2] " bluez.test.bot
2026-06-10 18:40   ` [PATCH BlueZ v2] " patchwork-bot+bluetooth

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