Skip to contentSkip to conversation

bthost: Fix not setting all parameters when using Create BIG cmd

PATCH In review Luiz Augusto von Dentz 2 participants 3 messages Mar 11, 2022 – Mar 12, 2022 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/2 bthost: Fix not setting all parameters when using Create BIG cmd

From: Luiz Augusto von Dentz <[email protected]>

Create BIG shall set proper values for interval, latency, rtn and phy.

---
 emulator/bthost.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
emulator/bthost.c +4 -1
index a7a0b8428..75fa625b1 100644
@@ -3104,8 +3104,11 @@ void bthost_create_big(struct bthost *bthost, uint8_t num_bis)
 	cp.handle = 0x01;
 	cp.adv_handle = 0x01;
 	cp.num_bis = num_bis;
+	put_le24(10000, cp.bis.sdu_interval);
 	cp.bis.sdu = 40;
-	cp.bis.phy = 0x01;
+	cp.bis.latency = cpu_to_le16(10);
+	cp.bis.rtn = 0x02;
+	cp.bis.phy = 0x02;
 	send_command(bthost, BT_HCI_CMD_LE_CREATE_BIG, &cp, sizeof(cp));
 }
 
Signature · 1 line
2.35.1
author maintainer
#1 lore raw

PATCH 2/2 btdev: Fix CIS Established

From: Luiz Augusto von Dentz <[email protected]>

CIS Established was using the ISO latency instead of SDU interval for transport latency.

---
 emulator/btdev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
emulator/btdev.c +4 -4
index 09eadd24f..c60ce6dbe 100644
@@ -5774,10 +5774,10 @@ static void le_cis_estabilished(struct btdev *dev, struct btdev_conn *conn,
 				sizeof(remote->le_cig.params.c_interval));
 		memcpy(evt.cis_sync_delay, remote->le_cig.params.p_interval,
 				sizeof(remote->le_cig.params.p_interval));
-		memcpy(evt.c_latency, &remote->le_cig.params.c_latency,
-				sizeof(remote->le_cig.params.c_latency));
-		memcpy(evt.p_latency, &remote->le_cig.params.p_latency,
-				sizeof(remote->le_cig.params.p_latency));
+		memcpy(evt.c_latency, &remote->le_cig.params.c_interval,
+				sizeof(remote->le_cig.params.c_interval));
+		memcpy(evt.p_latency, &remote->le_cig.params.p_interval,
+				sizeof(remote->le_cig.params.p_interval));
 		evt.c_phy = remote->le_cig.cis[0].c_phy;
 		evt.p_phy = remote->le_cig.cis[0].p_phy;
 		evt.nse = 0x01;
Signature · 1 line
2.35.1
#2 lore raw
In reply to Luiz Augusto von Dentz

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=622790

---Test result---

Test Summary:

CheckPatch                    PASS      3.05 seconds
GitLint                       PASS      2.12 seconds
Prep - Setup ELL              PASS      55.50 seconds
Build - Prep                  PASS      0.88 seconds
Build - Configure             PASS      11.01 seconds
Build - Make                  PASS      1549.91 seconds
Make Check                    PASS      12.81 seconds
Make Check w/Valgrind         PASS      566.40 seconds
Make Distcheck                PASS      295.67 seconds
Build w/ext ELL - Configure   PASS      11.28 seconds
Build w/ext ELL - Make        PASS      1520.49 seconds
Incremental Build with patchesPASS      3122.33 seconds

---
Regards,
Linux Bluetooth