Bluetooth: controller: Fix ull_conn LSTO for must_expire

When CONFIG_BT_CTLR_CONN_META is enabled and the ticker "must_expire"
feature is used, collisions may cause incorrect decrement of the
supervision_expire counter, resulting in a too early link supervision
timeout.

Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
Morten Priess 2020-11-19 09:57:25 +01:00 committed by Carles Cufí
commit 392e044548
4 changed files with 16 additions and 0 deletions

View file

@ -1084,7 +1084,14 @@ void ull_conn_done(struct node_rx_event_done *done)
}
/* Events elapsed used in timeout checks below */
#if defined(CONFIG_BT_CTLR_CONN_META)
/* If event has shallow expiry do not add latency, but rely on
* accumulated lazy count.
*/
latency_event = conn->common.is_must_expire ? 0 : lll->latency_event;
#else
latency_event = lll->latency_event;
#endif
elapsed_event = latency_event + 1;
/* Slave drift compensation calc and new latency or