Skip to content

Commit fe348bc

Browse files
cvinayakdanieldegrasse
authored andcommitted
Bluetooth: Controller: Fixup ticker reschedule with drift
If the next ticker is too close then hop over it when rescheduling a ticker with drift in slot window is used. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 7f45bbe commit fe348bc

File tree

1 file changed

+9
-0
lines changed
  • subsys/bluetooth/controller/ticker

1 file changed

+9
-0
lines changed

subsys/bluetooth/controller/ticker/ticker.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,6 +2575,14 @@ static uint8_t ticker_job_reschedule_in_window(struct ticker_instance *instance)
25752575
ticks_start_offset +
25762576
ticks_to_expire_offset -
25772577
HAL_TICKER_RESCHEDULE_MARGIN);
2578+
2579+
} else if ((ticker_resched->ticks_slot == 0U) ||
2580+
ext_data->is_drift_in_window) {
2581+
/* Next expiry is too close - hop over after
2582+
* next node
2583+
*/
2584+
goto reschedule_in_window_hop_over;
2585+
25782586
} else {
25792587
/* Next expiry is too close - try the next
25802588
* node
@@ -2632,6 +2640,7 @@ static uint8_t ticker_job_reschedule_in_window(struct ticker_instance *instance)
26322640
continue;
26332641
}
26342642

2643+
reschedule_in_window_hop_over:
26352644
/* We din't find a valid slot for re-scheduling - try
26362645
* the next node
26372646
*/

0 commit comments

Comments
 (0)