Commit 2cf4e4ce authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Anas Nashif
Browse files

Bluetooth: controller: Fix CPR initiation while in Enc. setup



Fixes a bug where in Connection Parameter Request was
initiated by slave role while Encryption Setup had been
started by the peer master.

Fixes: #5823

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent e14188ec
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -7721,8 +7721,10 @@ static void event_connection_prepare(u32_t ticks_at_expire,
	event_counter = conn->event_counter + conn->latency_prepare;

#if defined(CONFIG_BT_CTLR_CONN_PARAM_REQ) || defined(CONFIG_BT_CTLR_PHY)
	/* Check if no other procedure with instant is requested */
	if (conn->llcp_ack == conn->llcp_req) {
	/* Check if no other procedure with instant is requested and not in
	 * Encryption setup.
	 */
	if ((conn->llcp_ack == conn->llcp_req) && !conn->pause_rx) {

#if defined(CONFIG_BT_CTLR_CONN_PARAM_REQ)
		/* check if CPR procedure is requested */