Bluetooth: Controller: Fix missing supervision/sync lost

When radio event prepare is cancelled due to preemption by
overlapping radio events, the extra done event processing
was missing and hence the use of accumulated prepares'
skip/latency count.
This caused the check for supervision timeout and sync
lost not be aware of the elapsed events.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2022-09-08 07:21:14 +05:30 committed by Carles Cufí
commit f11fe69450
6 changed files with 73 additions and 5 deletions

View file

@ -1552,7 +1552,11 @@ void ull_conn_done(struct node_rx_event_done *done)
#else
latency_event = lll->latency_event;
#endif
elapsed_event = latency_event + 1;
if (lll->latency_prepare) {
elapsed_event = latency_event + lll->latency_prepare;
} else {
elapsed_event = latency_event + 1U;
}
/* Peripheral drift compensation calc and new latency or
* central terminate acked