zephyr/subsys/bluetooth/host
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
..
classic kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
addr_internal.h
addr.c
adv.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
adv.h
aes_ccm.c
att_internal.h
att.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
buf_view.h everywhere: replace double words 2024-06-22 05:40:22 -04:00
buf.c Bluetooth: host: Use correct user_data size for hci_rx_pool 2024-07-13 10:25:31 -04:00
CMakeLists.txt bt-host: add option to use PSA APIs instead of TinyCrypt 2024-06-14 15:41:34 +02:00
conn_internal.h bluetooth: host: Add support for LE Connection Subrating 2024-08-05 10:16:27 +02:00
conn.c Bluetooth: host: fix incorrect ISO HCI fragmentation logic 2024-08-08 06:07:08 -04:00
crypto_psa.c bt-host: add option to use PSA APIs instead of TinyCrypt 2024-06-14 15:41:34 +02:00
crypto_tc.c bt-host: add option to use PSA APIs instead of TinyCrypt 2024-06-14 15:41:34 +02:00
crypto.h
data.c
direction_internal.h
direction.c Bluetooth: HCI: Expose bt_hci_per_adv_sync_lookup_handle() 2024-07-27 15:09:00 +03:00
ecc.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
ecc.h
gatt_internal.h
gatt.c Bluetooth: GATT: factor out notify callback 2024-07-05 18:38:17 +02:00
hci_common.c
hci_core.c bluetooth: host: Add support for LE Connection Subrating 2024-08-05 10:16:27 +02:00
hci_core.h Bluetooth: host: Send host num completes as early as possible 2024-07-27 15:18:51 +03:00
hci_ecc.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
hci_ecc.h
hci_raw_internal.h Bluetooth: host: Add support for new-style HCI drivers 2024-06-11 19:42:49 -04:00
hci_raw.c Bluetooth: host: hci_raw: Use existing H4 defines from hci_types.h 2024-06-11 19:42:49 -04:00
id.c bluetooth: host: fix typo 2024-06-25 10:27:23 -04:00
id.h
iso_internal.h Bluetooth: host: Change TX pattern (push -> pull) 2024-06-12 18:51:34 +02:00
iso.c Bluetooth: host: fix incorrect ISO HCI fragmentation logic 2024-08-08 06:07:08 -04:00
Kconfig kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
Kconfig.gatt kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
Kconfig.l2cap kconfig: replace known integer constants with variables 2024-07-27 20:49:15 +03:00
keys.c Bluetooth: Host: Fix not clearing IDs and keys upon bt_disable() 2024-05-28 09:11:52 -07:00
keys.h Bluetooth: Host: Fix not clearing IDs and keys upon bt_disable() 2024-05-28 09:11:52 -07:00
l2cap_internal.h Bluetooth: L2CAP: Make bt_l2cap_send_pdu() 2024-06-12 18:51:34 +02:00
l2cap.c Bluetooth: L2CAP: Set NULL callback for PDUs 2024-08-01 16:49:37 +01:00
long_wq.c
long_wq.h
monitor.c bluetooth: make monitor timestamps roll over less 2024-08-02 13:41:32 +02:00
monitor.h
scan.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
scan.h Bluetooth: HCI: Expose bt_hci_per_adv_sync_lookup_handle() 2024-07-27 15:09:00 +03:00
settings.c
settings.h
smp_null.c Bluetooth: L2CAP: Make bt_l2cap_send_pdu() 2024-06-12 18:51:34 +02:00
smp.c Bluetooth: Conditionally print out HCI error codes as strings 2024-07-30 18:25:56 +01:00
smp.h Bluetooth: Mark bt_<type>_err_to_str() APIs experimental 2024-07-11 13:11:59 -04:00
testing.c Bluetooth: Host: Callback registering functions to return status 2024-06-13 08:03:28 -04:00
testing.h
uuid.c