From 364a8c27860fc649be31b339838ce7b7fcdc3237 Mon Sep 17 00:00:00 2001 From: Piotr Pryga Date: Tue, 17 May 2022 14:07:43 +0200 Subject: [PATCH] Bluetooth: Controller: df: CTE req not disabled if run in single shot There is an error. CTE request control procedure can be run in single shot or periodic mode. In case of run in single show, it is not disabled after completion. The code responsible for the disable was deleted by commit: ac7d0506f88508e7440288c1ec4319a9f7d0ad44. The cte_req.is_enabled should be set to zero if the CTE request completes and cte_req.req_interval is zero. Signed-off-by: Piotr Pryga --- subsys/bluetooth/controller/ll_sw/ull_llcp_common.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c b/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c index 934f8dd769e..d783dc92cc0 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c +++ b/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c @@ -250,6 +250,11 @@ static void lp_comm_complete_cte_req(struct ll_conn *conn, struct proc_ctx *ctx) if (conn->llcp.cte_req.req_interval != 0U) { conn->llcp.cte_req.req_expire = conn->llcp.cte_req.req_interval; + } else { + /* Disable the CTE request procedure when it is completed in + * case it was executed as non-periodic. + */ + conn->llcp.cte_req.is_enabled = 0U; } ctx->state = LP_COMMON_STATE_IDLE; } else {