Bluetooth: controller: Fix CUI/CPR lock during TO

Release the CUI/CPR lock if the connection owning the lock is
terminated.

This can happen if a device performing a CUI/CPR procedure gets a LSTO
before the procedeure completes or the procedure itself TO.

Signed-off-by: Thomas Ebert Hansen <thoh@oticon.com>
This commit is contained in:
Thomas Ebert Hansen 2020-12-09 14:58:30 +01:00 committed by Carles Cufí
commit f0f25cfc32

View file

@ -1700,6 +1700,11 @@ static void conn_cleanup(struct ll_conn *conn, uint8_t reason)
struct node_rx_pdu *rx;
uint32_t ticker_status;
/* reset mutex */
if (conn == conn_upd_curr) {
ull_conn_upd_curr_reset();
}
/* Only termination structure is populated here in ULL context
* but the actual enqueue happens in the LLL context in
* tx_lll_flush. The reason being to avoid passing the reason