Skip to content

Commit 3c34163

Browse files
cvinayakcarlescufi
authored andcommitted
Bluetooth: Controller: Add -ECANCELED on return from lll_preempt_calc
Add -ECANCELED on return from lll_preempt_calc so that assert check can be placed in the prepare callbacks of the state/role implementations. Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent ac84995 commit 3c34163

File tree

7 files changed

+14
-0
lines changed

7 files changed

+14
-0
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,8 @@ static int prepare_cb(struct lll_prepare_param *p)
10401040
ticks_at_event)) {
10411041
radio_isr_set(isr_abort, lll);
10421042
radio_disable();
1043+
1044+
return -ECANCELED;
10431045
} else
10441046
#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */
10451047
{

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_aux.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ static int prepare_cb(struct lll_prepare_param *p)
322322
ticks_at_event)) {
323323
radio_isr_set(lll_isr_abort, lll);
324324
radio_disable();
325+
326+
return -ECANCELED;
325327
} else
326328
#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */
327329
{

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_adv_sync.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ static int prepare_cb(struct lll_prepare_param *p)
243243
ticks_at_event)) {
244244
radio_isr_set(lll_isr_abort, lll);
245245
radio_disable();
246+
247+
return -ECANCELED;
246248
} else
247249
#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */
248250
{

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_central.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ static int prepare_cb(struct lll_prepare_param *p)
245245
ticks_at_event)) {
246246
radio_isr_set(lll_isr_abort, lll);
247247
radio_disable();
248+
249+
return -ECANCELED;
248250
} else
249251
#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */
250252
{

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_peripheral.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ static int prepare_cb(struct lll_prepare_param *p)
327327
ticks_at_event)) {
328328
radio_isr_set(lll_isr_abort, lll);
329329
radio_disable();
330+
331+
return -ECANCELED;
330332
} else
331333
#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */
332334
{

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ static int common_prepare_cb(struct lll_prepare_param *p, bool is_resume)
481481
ticks_at_event)) {
482482
radio_isr_set(isr_abort, lll);
483483
radio_disable();
484+
485+
return -ECANCELED;
484486
} else
485487
#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED &&
486488
* (EVENT_OVERHEAD_PREEMPT_US <= EVENT_OVERHEAD_PREEMPT_MIN_US)

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan_aux.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,8 @@ static int prepare_cb(struct lll_prepare_param *p)
565565
ticks_at_event)) {
566566
radio_isr_set(isr_done, lll_aux);
567567
radio_disable();
568+
569+
return -ECANCELED;
568570
} else
569571
#endif /* CONFIG_BT_CTLR_XTAL_ADVANCED */
570572
{

0 commit comments

Comments
 (0)