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


The following commit(s) were added to refs/heads/master by this push:
     new 02ceea9f5 nimble/ll/big: Ensure the Segmentation Header fits the SDU
02ceea9f5 is described below

commit 02ceea9f54908939c123d9ebfaee6f3ab53801f5
Author: Mariusz Skamra <[email protected]>
AuthorDate: Mon Apr 7 10:15:30 2025 +0200

    nimble/ll/big: Ensure the Segmentation Header fits the SDU
    
    As a workaround for SDU Interval issue, if the user requests
    the Framed PDUs to be used, make sure the Segmentation Header
    fits the PDU, so that we could avoid the segmentation.
---
 nimble/controller/src/ble_ll_iso_big.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/nimble/controller/src/ble_ll_iso_big.c 
b/nimble/controller/src/ble_ll_iso_big.c
index 1454ed6a5..774465315 100644
--- a/nimble/controller/src/ble_ll_iso_big.c
+++ b/nimble/controller/src/ble_ll_iso_big.c
@@ -1327,7 +1327,15 @@ ble_ll_iso_big_hci_create(const uint8_t *cmdbuf, uint8_t 
len)
         bp.framing = cmd->framing;
         bp.iso_interval = iso_interval;
         bp.bn = 1;
-        bp.max_pdu = bp.max_sdu;
+        if (cmd->framing == BLE_HCI_ISO_FRAMING_UNFRAMED) {
+            bp.max_pdu = bp.max_sdu;
+        } else {
+            /**
+             * XXX: The requirements for using Unframed PDUs are met but the 
user
+             * requested Framed PDUs explicitly. Ensure the PDU fits the 
Segmentation Header.
+             */
+            bp.max_pdu = bp.max_sdu + 5;
+        }
     }
 
     rc = ble_ll_iso_big_create(cmd->big_handle, cmd->adv_handle, cmd->num_bis,

Reply via email to