From e0f51b29efa9843a676f2ec9294496d15f4cf2d6 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Tue, 25 Feb 2020 11:18:27 +0530 Subject: [PATCH] Bluetooth: controller: split: Fix assert on DLE procedure stall Fix local initiated Data Length Update procedure from being stalled when a remote initiates a procedure with instant. Fixes #23069. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ull_conn.c | 21 +++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index a9012206391..e401b963f33 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -830,8 +830,27 @@ int ull_conn_llcp(struct ll_conn *conn, u32_t ticks_at_expire, u16_t lazy) } } - /* check if procedure is requested */ + /* Check if procedures with instant or encryption setup is requested or + * active. + */ if (((conn->llcp_req - conn->llcp_ack) & 0x03) == 0x02) { + /* Process parallel procedures that are active */ + if (0) { +#if defined(CONFIG_BT_CTLR_DATA_LENGTH) + /* Check if DLE in progress */ + } else if (conn->llcp_length.ack != conn->llcp_length.req) { + if ((conn->llcp_length.state == + LLCP_LENGTH_STATE_RESIZE) || + (conn->llcp_length.state == + LLCP_LENGTH_STATE_RESIZE_RSP)) { + /* handle DLU state machine */ + event_len_prep(conn); + } +#endif /* CONFIG_BT_CTLR_DATA_LENGTH */ + } + + /* Process procedures with instants or encryption setup */ + /* FIXME: Make LE Ping cacheable */ switch (conn->llcp_type) { case LLCP_CONN_UPD: {