From 9e6f5668581fb0c4c706bd19125b0571279bd45f Mon Sep 17 00:00:00 2001 From: Piotr Pryga Date: Fri, 29 Apr 2022 14:47:41 +0200 Subject: [PATCH] Bluetooth: Controller: llcp: Add handling of unexpe CTRL PDU by CTE req There was missing code responsible for handling of unexpected response for CTE request. The commit adds code that will terminate connection in case a peer device reposnes with unexpected control PDU that is not a remote procedure reques. Signed-off-by: Piotr Pryga --- subsys/bluetooth/controller/ll_sw/ull_llcp_common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c b/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c index e77ed00243d..934f8dd769e 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c +++ b/subsys/bluetooth/controller/ll_sw/ull_llcp_common.c @@ -274,7 +274,9 @@ static void lp_comm_complete_cte_req(struct ll_conn *conn, struct proc_ctx *ctx) ull_cp_cte_req_set_disable(conn); ctx->state = LP_COMMON_STATE_IDLE; } else { - /* Illegal response opcode */ + /* Illegal response opcode, internally changes state to + * LP_COMMON_STATE_IDLE + */ lp_comm_terminate_invalid_pdu(conn, ctx); } } else {