From f0f25cfc32dce31e198b3e9d6ad141c6766d8ce0 Mon Sep 17 00:00:00 2001 From: Thomas Ebert Hansen Date: Wed, 9 Dec 2020 14:58:30 +0100 Subject: [PATCH] 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 --- subsys/bluetooth/controller/ll_sw/ull_conn.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index 0090e3a6da2..1e5e4a03fac 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -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