Skip to content

Commit 49bb9e2

Browse files
Thalleyfabiobaltieri
authored andcommitted
Bluetooth: ISO: Fix bad sys_get for {c,p}_latency
The fields in the HCI events are 24-bits but were treated as 16-bit values. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
1 parent b79232f commit 49bb9e2

File tree

1 file changed

+2
-2
lines changed
  • subsys/bluetooth/host

1 file changed

+2
-2
lines changed

‎subsys/bluetooth/host/iso.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1251,14 +1251,14 @@ static void store_cis_info(const struct bt_hci_evt_le_cis_established *evt, stru
12511251

12521252
central->bn = evt->c_bn;
12531253
central->phy = bt_get_phy(evt->c_phy);
1254-
central->latency = sys_get_le16(evt->c_latency);
1254+
central->latency = sys_get_le24(evt->c_latency);
12551255
central->max_pdu = sys_le16_to_cpu(evt->c_max_pdu);
12561256
/* Transform to n * 1.25ms */
12571257
central->flush_timeout = info->iso_interval * evt->c_ft;
12581258

12591259
peripheral->bn = evt->p_bn;
12601260
peripheral->phy = bt_get_phy(evt->p_phy);
1261-
peripheral->latency = sys_get_le16(evt->p_latency);
1261+
peripheral->latency = sys_get_le24(evt->p_latency);
12621262
peripheral->max_pdu = sys_le16_to_cpu(evt->p_max_pdu);
12631263
/* Transform to n * 1.25ms */
12641264
peripheral->flush_timeout = info->iso_interval * evt->p_ft;

0 commit comments

Comments
 (0)