From 343937c54214bcd300caf57ad7a2856e6d58b8b2 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Mon, 29 Apr 2019 15:43:46 +0530 Subject: [PATCH] Bluetooth: controller: ull/lll: Fix pin or key missing response Fix the missing reset of Encryption Procedure state when the peripheral responded with error reason as pin or key missing which otherwise caused connection disconnection on next reception of data or control packet. Relates to #15570, and #15727. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ull_conn.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index 5e5652d192b..d2dae65b321 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -4157,6 +4157,13 @@ static inline void ctrl_tx_ack(struct ll_conn *conn, struct node_tx **tx, } break; + case PDU_DATA_LLCTRL_TYPE_REJECT_EXT_IND: + if (pdu_tx->llctrl.reject_ext_ind.reject_opcode != + PDU_DATA_LLCTRL_TYPE_ENC_REQ) { + break; + } + /* Pass through */ + case PDU_DATA_LLCTRL_TYPE_REJECT_IND: /* resume data packet rx and tx */ conn->pause_rx = 0U;