Draft
Bluetooth: nordic lll: deduplicate CIS flush-timeout paths via shared helpers#34
Conversation
Copilot
AI
changed the title
[WIP] Refactor duplicated flush-timeout logic into shared helper functions
Bluetooth: nordic lll: deduplicate CIS flush-timeout paths via shared helpers
Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Central and peripheral CIS LLL paths duplicated the same flush-timeout mechanics (subevent-limit math, Tx/Rx BN advancement, and Rx lost-data reporting) across mid-event flush, event-close finalization, and lazy-update flows. This change factors those repeated paths into shared helpers while preserving existing timeout conditions and interleaved guards.
Shared flush helper surface
subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn_iso_flush.h.lll_flush_subevent_limit(nse, bn, payload_count)lll_flush_tx_advance(cis_lll)lll_flush_rx_advance(cis_lll)Central ISO refactor (
lll_central_iso.c)uformula at flush sites withlll_flush_subevent_limit(...).lll_flush_tx_advance(...)/lll_flush_rx_advance(...).iso_rx_data_lost()to role-specific timestamp derivation + shared lost-data helper call.Peripheral ISO refactor (
lll_peripheral_iso.c)payload_count_flush()payload_count_rx_flush_or_txrx_inc()payload_count_lazy()iso_rx_data_lost()similarly to timestamp derivation + shared helper invocation.Example of the call-site simplification: