zephyr/subsys/bluetooth
Jonathan Rico 58ec51616d Bluetooth: host: fix incorrect ISO HCI fragmentation logic
Don't push the TS flag on `buf` itself.

This messes up the MTU calculations: a packet that would exactly fit the
MTU and has a timestamp would be unnecessarily fragmented.

The MTU check is done on `buf` as a whole. At the point where the
fragmentation length is decided, `buf` includes one extra byte to pass the
TS bit around. That byte shouldn't count towards the MTU.

Instead, infer the presence of the timestamp by inspecting the amount of
headroom that the buffer has. This works because we always reserve
enough memory to push the timestamp, but not always push a timestamp on
the buffer. #tightlycoupled

This method is slightly uglier IMO, but eases MTU confusion and doesn't
rely on user_data.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-08 06:07:08 -04:00
..
audio Bluetooth: BAP: Scan delegator add src without PA sync 2024-07-28 07:31:06 +03:00
common kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
controller Bluetooth: Controller: change condition in while to Boolean 2024-08-05 16:30:13 +02:00
crypto
host Bluetooth: host: fix incorrect ISO HCI fragmentation logic 2024-08-08 06:07:08 -04:00
lib
mesh kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
services Bluetooth: DIS: integrate app version into FW revision characteristic 2024-08-01 09:13:39 +01:00
shell bluetooth: shell: Add shell commands for LE Connection Subrating 2024-08-05 10:16:27 +02:00
CMakeLists.txt
Kconfig bluetooth: Add Kconfig for LE Connection Subrating 2024-08-05 10:16:27 +02:00
Kconfig.adv
Kconfig.iso kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
Kconfig.logging