From d317e8e64696f2b208f52603d23e836e2dfbd70d Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Tue, 26 May 2020 09:41:00 -0700 Subject: [PATCH] emulator: Use master settings for CIS params The slave will be the first to respond with CIS Estabished but only the master has the CIG params set so this switch to master so parameters are proper. --- emulator/btdev.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 3fb860855..066c5630a 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -1417,6 +1417,9 @@ static void le_cis_estabilished(struct btdev *dev, uint8_t status) evt.status = status; + if (dev->conn) + dev = dev->conn; + if (!evt.status) { evt.conn_handle = cpu_to_le16(ISO_HANDLE); /* TODO: Figure out if these values makes sense */ @@ -1435,8 +1438,8 @@ static void le_cis_estabilished(struct btdev *dev, uint8_t status) evt.s_bn = 0x01; evt.m_ft = 0x01; evt.s_ft = 0x01; - evt.m_mtu = dev->iso_mtu; - evt.s_mtu = dev->iso_mtu; + evt.m_mtu = dev->le_cig.cis.m_sdu; + evt.s_mtu = dev->le_cig.cis.s_sdu; evt.interval = dev->le_cig.params.m_latency; } -- 2.47.3