From 4bae390858d0bfa434e4c2d43950480b248a8718 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 10 Jun 2025 10:49:31 -0400 Subject: [PATCH] btdev: Fix not setting sid on BT_HCI_EVT_LE_PA_SYNC_ESTABLISHED 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 --git a/emulator/btdev.c b/emulator/btdev.c index 2c62dc711..555f55e52 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; -- 2.47.3