Bluetooth: controller: Fix terminate procedure timeout

Fix terminate procedure timeout when supervision timeout
equals connection interval. In this case, avoid timing out
in the first event of procedure initiation.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2017-07-17 13:39:48 +02:00 committed by Johan Hedberg
commit 1ff96f2588

View file

@ -6792,6 +6792,13 @@ static void event_connection_prepare(u32_t ticks_at_expire,
* replace any other timeout running
*/
conn->procedure_expire = conn->supervision_reload;
/* NOTE: if supervision timeout equals connection
* interval, dont timeout in current event.
*/
if (conn->procedure_expire <= 1) {
conn->procedure_expire++;
}
}
}