Bluetooth: controller: Fix conn param req initiation check

Fixed the check related to initiating connection parameter
request procedure. This will avoid sending invalid repeated
dispatch of connection parameter request PDU.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2017-12-06 15:25:03 +01:00 committed by Kumar Gala
commit ba13c99141

View file

@ -8912,6 +8912,12 @@ static u32_t conn_update_req(struct connection *conn)
return 1;
}
#if defined(CONFIG_BT_CTLR_CONN_PARAM_REQ)
if (conn->llcp_conn_param.req != conn->llcp_conn_param.ack) {
return 1;
}
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
if (!conn->role) {
conn->llcp.conn_upd.win_size = 1;
conn->llcp.conn_upd.win_offset_us = 0;
@ -8945,7 +8951,7 @@ static u32_t conn_update_req(struct connection *conn)
conn->llcp_conn_param.ack--;
return 0;
#endif /* !CONFIG_BT_CTLR_CONN_PARAM_REQ */
#endif /* CONFIG_BT_CTLR_CONN_PARAM_REQ */
}