diff mbox series

[BlueZ,v2,1/2] btdev: Fix not setting sid on BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED

Message ID 20250610180244.1133512-1-luiz.dentz@gmail.com
State New
Headers show
Series [BlueZ,v2,1/2] btdev: Fix not setting sid on BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED | expand

Commit Message

Luiz Augusto von Dentz June 10, 2025, 6:02 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

The event BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED shall set the SID accourding
to the value set in the periodic advertisement it is synchronized since
the kernel will use that to complete the connection and notify the
socket.
---
 emulator/btdev.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/emulator/btdev.c b/emulator/btdev.c
index 2c62dc711d98..555f55e52772 100644
--- a/emulator/btdev.c
+++ b/emulator/btdev.c
@@ -5479,6 +5479,7 @@  static void le_pa_sync_estabilished(struct btdev *dev, struct btdev *remote,
 	per_adv->sync_handle = sync_handle;
 
 	ev.handle = cpu_to_le16(per_adv->sync_handle);
+	ev.sid = per_adv->sid;
 	ev.addr_type = per_adv->addr_type;
 	memcpy(ev.addr, per_adv->addr, sizeof(ev.addr));
 	ev.phy = 0x01;