Bluetooth: Controller: Various fixes for CIS termination handling
Handling of CIS termination had several issues, most notably:
- it depended on allocating a termination node from the general rx
node pool, causing asserts if the pool was exhausted
- CIS established events was not always generated when required,
potentially causing CIS Centrals to get stuck without being able
to create any new CISes
- Cancelling a CIS Create procedure only worked correctly if the
CIS Create was currently active and happened to belong to the
same CIS
- CIG state handling often (always?) assumed a CIG with only one CIS
ll_conn_iso_stream now has a dedicated termination node, same as
ll_conn and ll_sync_iso_set
LLCP statemachine for Cis Create procedure has been reworked to ensure
a notification node for CIS Established is available as early as possible.
In addition, it should now always be sent when needed
Introduced ull_central_iso_all_cises_terminated() to check if all CISes
in a CIG has been terminated (or not created yet) - which is now
used for updating the CIG state
ull_cp_cc_cancel() now takes the CIS to cancel as an argument so
it doesn't end up canceling an entirely different CIS Create procedure;
In addition it now works for queued procedures as well
Flushing a (central) CIS Create procedure in LLCP will now properly
generate a CIS Established event (with an error)
Signed-off-by: Troels Nilsson <trnn@demant.com>
16 files changed