This is an automated email from the ASF dual-hosted git repository. andk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git
commit b9a5982cd989b613560414cd26826221b47e549f Author: Mariusz Skamra <[email protected]> AuthorDate: Wed Feb 19 10:57:52 2025 +0300 nimble/ll/isoal: Fix unframed PDU end fragment LLID This fixes unframed PDU end fragment LLID thta shall be set to 0b00 when the payload of the ISO Data PDU contains the end fragment of an SDU. --- nimble/controller/src/ble_ll_isoal.c | 7 +++++- nimble/controller/test/src/ble_ll_isoal.c | 42 +++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/nimble/controller/src/ble_ll_isoal.c b/nimble/controller/src/ble_ll_isoal.c index fd2c6ac6a..2cb842aa4 100644 --- a/nimble/controller/src/ble_ll_isoal.c +++ b/nimble/controller/src/ble_ll_isoal.c @@ -334,7 +334,12 @@ ble_ll_isoal_mux_unframed_get(struct ble_ll_isoal_mux *mux, uint8_t idx, *llid = 1; pdu_len = 0; } else { - *llid = (pdu_idx < mux->pdu_per_sdu - 1); + /* LLID = 0b00: Data remaining fits the ISO Data PDU size, + * it's end fragment of an SDU or complete SDU. + * LLID = 0b01: Data remaining exceeds the ISO Data PDU size, + * it's start or continuation fragment of an SDU. + */ + *llid = rem_len > mux->max_pdu; pdu_len = min(mux->max_pdu, rem_len); } diff --git a/nimble/controller/test/src/ble_ll_isoal.c b/nimble/controller/test/src/ble_ll_isoal.c index 6423ed725..cfb9d74cf 100644 --- a/nimble/controller/test/src/ble_ll_isoal.c +++ b/nimble/controller/test/src/ble_ll_isoal.c @@ -634,6 +634,45 @@ test_ial_broadcast_large_sdu_bis(const struct test_ial_broadcast_large_sdu_bis_c test_ial_teardown(&mux); } +TEST_CASE_SELF(test_ial_bis_unf_brd_bv_09_c) { + const struct test_ial_broadcast_large_sdu_bis_cfg cfg = { + .NSE = 12, + .Framed = 0, + .Framing_Mode = 0, + .BN = 6, + .SDU_Interval = 20000, + .ISO_Interval = 40000, + }; + + test_ial_broadcast_large_sdu_bis(&cfg); +} + +TEST_CASE_SELF(test_ial_bis_unf_brd_bv_10_c) { + const struct test_ial_broadcast_large_sdu_bis_cfg cfg = { + .NSE = 6, + .Framed = 0, + .Framing_Mode = 0, + .BN = 4, + .SDU_Interval = 20000, + .ISO_Interval = 20000, + }; + + test_ial_broadcast_large_sdu_bis(&cfg); +} + +TEST_CASE_SELF(test_ial_bis_unf_brd_bv_11_c) { + const struct test_ial_broadcast_large_sdu_bis_cfg cfg = { + .NSE = 8, + .Framed = 0, + .Framing_Mode = 0, + .BN = 4, + .SDU_Interval = 25000, + .ISO_Interval = 25000, + }; + + test_ial_broadcast_large_sdu_bis(&cfg); +} + TEST_CASE_SELF(test_ial_bis_fra_brd_bv_13_c) { const struct test_ial_broadcast_large_sdu_bis_cfg cfg = { .NSE = 10, @@ -1065,6 +1104,9 @@ TEST_SUITE(ble_ll_isoal_test_suite) { test_ial_bis_fra_brd_bv_29_c(); /* Broadcast Large SDU, BIS */ + test_ial_bis_unf_brd_bv_09_c(); + test_ial_bis_unf_brd_bv_10_c(); + test_ial_bis_unf_brd_bv_11_c(); test_ial_bis_fra_brd_bv_13_c(); test_ial_bis_fra_brd_bv_15_c();
