Bluetooth: Controller: Fix assertion establishing Peripheral ISO

Fix assertion observed establishing subsequent Peripheral
ISO connection due to a race between the new CIS context
being acquired into a CIG and LLL getting a CIS sorted by
CIS offset in that CIG. Get only active CISes from the CIG
in the LLL prepare.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2025-05-15 14:34:10 +02:00 committed by Benjamin Cabé
commit d720032a43

View file

@ -345,7 +345,7 @@ ull_conn_iso_lll_stream_sorted_get_by_group(struct lll_conn_iso_group *cig_lll,
cis = ll_conn_iso_stream_get(handle);
/* Match CIS contexts associated with the CIG */
if (cis->group == cig) {
if ((cis->group == cig) && (cis->lll.active == 1U)) {
if (cis_curr && (cis->lll.offset <= cis_offset_curr)) {
/* Skip already returned CISes with offsets less
* than the current CIS.