bluetooth: controller: Prevent unnecesary ticker "must expire"

When running a ticker node as "must expire", the node would invoke the
ticker callback even when programmed with latency. As "must expire" is
intended for scheduled events which are skipped due to collision, and as
such expected by LLL, purposefully skipped events should not generate
"must expire" callbacks.

Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
Morten Priess 2019-10-06 22:14:30 +02:00 committed by Alberto Escolar
commit 90fabfd96b

View file

@ -791,8 +791,11 @@ void ticker_worker(void *param)
if (ticker->ticks_slot != 0U &&
(slot_reserved || ticker_resolve_collision(node, ticker))) {
ticker->lazy_current++;
if (ticker->must_expire == 0U) {
/* Skip this ticker node */
if ((ticker->must_expire == 0U) ||
(ticker->lazy_periodic >= ticker->lazy_current)) {
/* Not a must-expire case or this is programmed
* latency. Skip this ticker node
*/
continue;
}
/* Continue but perform shallow expiry */