From 44030a9da79d85b7846e4534a9294b7c7aaffe5f Mon Sep 17 00:00:00 2001 From: Morten Priess Date: Thu, 29 Sep 2022 11:12:01 +0200 Subject: [PATCH] Bluetooth: controller: Fix CIS restart state de-initialization When a CIS is terminated, the associated link pool must be de- initialized to be ready for next creation of the corresponding instance in memory. Signed-off-by: Morten Priess --- subsys/bluetooth/controller/ll_sw/ull_conn_iso.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn_iso.c b/subsys/bluetooth/controller/ll_sw/ull_conn_iso.c index 00b60e57467..a532f69ebfb 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn_iso.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn_iso.c @@ -543,6 +543,7 @@ static int init_reset(void) cis = ll_conn_iso_stream_get(handle); cis->cis_id = 0; cis->group = NULL; + cis->lll.link_tx_free = NULL; } conn_accept_timeout = CONN_ACCEPT_TIMEOUT_DEFAULT; @@ -962,6 +963,11 @@ static void cis_tx_lll_flush(void *param) (void **)&tx); } + LL_ASSERT(!lll->link_tx_free); + link = memq_deinit(&lll->memq_tx.head, &lll->memq_tx.tail); + LL_ASSERT(link); + lll->link_tx_free = link; + /* Resume CIS teardown in ULL_HIGH context */ mfys[cig->lll.handle].param = &cig->lll; ret = mayfly_enqueue(TICKER_USER_ID_LLL,