Skip to content

Commit

Permalink
Bluetooth: controller: Revert strict preempt ticker start failure check
Browse files Browse the repository at this point in the history
Revert the strict preempt ticker start failure check.
Preempt ticker start can fail when enqueuing prepares into
already filled pipeline which has preempt ticker already
started for the first prepare that was added in the
pipeline.

Regression introduced in commit 5b75bdf ("Bluetooth:
controller: nRF5: Check preempt event on timeout").

Fixes zephyrproject-rtos#35476.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
  • Loading branch information
cvinayak committed May 20, 2021
1 parent aa78a64 commit ce3dcca
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions subsys/bluetooth/controller/ll_sw/nordic/lll/lll.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ static void isr_race(void *param);
#if !defined(CONFIG_BT_CTLR_LOW_LAT)
static void ticker_stop_op_cb(uint32_t status, void *param);
static void ticker_start_op_cb(uint32_t status, void *param);
static void ticker_start_next_op_cb(uint32_t status, void *param);
static uint32_t preempt_ticker_start(struct lll_event *event,
ticker_op_func op_cb);
static void preempt_ticker_cb(uint32_t ticks_at_expire, uint32_t remainder,
Expand Down Expand Up @@ -644,6 +643,7 @@ int lll_prepare_resolve(lll_is_abort_cb_t is_abort_cb, lll_abort_cb_t abort_cb,

ret = preempt_ticker_start(next, ticker_start_op_cb);
LL_ASSERT((ret == TICKER_STATUS_SUCCESS) ||
(ret == TICKER_STATUS_FAILURE) ||
(ret == TICKER_STATUS_BUSY));

#else /* CONFIG_BT_CTLR_LOW_LAT */
Expand Down Expand Up @@ -710,8 +710,9 @@ int lll_prepare_resolve(lll_is_abort_cb_t is_abort_cb, lll_abort_cb_t abort_cb,
} while (p->is_aborted || p->is_resume);

/* Start the preempt timeout */
ret = preempt_ticker_start(p, ticker_start_next_op_cb);
ret = preempt_ticker_start(p, ticker_start_op_cb);
LL_ASSERT((ret == TICKER_STATUS_SUCCESS) ||
(ret == TICKER_STATUS_FAILURE) ||
(ret == TICKER_STATUS_BUSY));
#endif /* !CONFIG_BT_CTLR_LOW_LAT */

Expand Down Expand Up @@ -758,13 +759,6 @@ static void ticker_start_op_cb(uint32_t status, void *param)
(status == TICKER_STATUS_FAILURE));
}

static void ticker_start_next_op_cb(uint32_t status, void *param)
{
ARG_UNUSED(param);

LL_ASSERT(status == TICKER_STATUS_SUCCESS);
}

static uint32_t preempt_ticker_start(struct lll_event *event,
ticker_op_func op_cb)
{
Expand Down Expand Up @@ -845,8 +839,9 @@ static void preempt(void *param)
uint32_t ret;

/* Start the preempt timeout */
ret = preempt_ticker_start(next, ticker_start_next_op_cb);
ret = preempt_ticker_start(next, ticker_start_op_cb);
LL_ASSERT((ret == TICKER_STATUS_SUCCESS) ||
(ret == TICKER_STATUS_FAILURE) ||
(ret == TICKER_STATUS_BUSY));

return;
Expand Down

0 comments on commit ce3dcca

Please sign in to comment.