From 0a892310d3e955aabfb7fe423d7c481ee29c4a5f Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Tue, 5 Nov 2019 12:17:57 +0530 Subject: [PATCH] Bluetooth: controller: split: Fix feature exchange state reset Fix feature exchange event generation to be correctly deferred to wait for Rx node availability for cases when the procedure has already been performed on air. Without this fix, remote feature request from host may not get back a HCI event back. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ull_conn.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index f715d46998b..220a7f640c2 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -2657,19 +2657,18 @@ static inline void event_fex_prep(struct ll_conn *conn) struct node_rx_pdu *rx; struct pdu_data *pdu; - /* procedure request acked */ - conn->llcp_feature.ack = conn->llcp_feature.req; - /* get a rx node for ULL->LL */ rx = ll_pdu_rx_alloc(); if (!rx) { return; } - rx->hdr.handle = conn->lll.handle; - rx->hdr.type = NODE_RX_TYPE_DC_PDU; + /* procedure request acked */ + conn->llcp_feature.ack = conn->llcp_feature.req; /* prepare feature rsp structure */ + rx->hdr.handle = conn->lll.handle; + rx->hdr.type = NODE_RX_TYPE_DC_PDU; pdu = (void *)rx->pdu; pdu->ll_id = PDU_DATA_LLID_CTRL; pdu->len = offsetof(struct pdu_data_llctrl, feature_rsp) +