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: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2018-01-26 08:06:52 +01:00 committed by Carles Cufí
commit f5d64aafaa

View file

@ -7705,8 +7705,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 */