From: Luiz Augusto von Dentz Date: Tue, 26 May 2020 16:41:00 +0000 (-0700) Subject: emulator: Use master settings for CIS params X-Git-Tag: submit/tizen/20210606.232858~119 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7526126eb28552cf9afcf8e45b13b5ea4adb57f;p=platform%2Fupstream%2Fbluez.git 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. Signed-off-by: Anuj Jain Signed-off-by: Ayush Garg --- diff --git a/emulator/btdev.c b/emulator/btdev.c index 3fb86085..066c5630 100755 --- 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; }