Commit 32637290 authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by Benjamin Cabé
Browse files

Bluetooth: Controller: Fix assertion terminating Periodic Sync



Fix assertion due to changes introduced to support multiple
advertising chain reception.

Auxiliary context association with the Periodic Sync context
was not cleared due to which when terminating a Periodic
Synchronization triggered an assertion check, under race
conditions, detecting that the auxiliary context was already
released.

Signed-off-by: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
parent 2461552e
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -635,6 +635,9 @@ static void abort_cb(struct lll_prepare_param *prepare_param, void *param)
	lll = prepare_param->param;
	lll->skip_prepare += (lll->lazy_prepare + 1U);

	/* Reset Sync context association with any Aux context as the chain reception is aborted. */
	lll->lll_aux = NULL;

	/* Extra done event, to check sync lost */
	e = ull_event_done_extra_get();
	LL_ASSERT(e);
@@ -1185,6 +1188,9 @@ static void isr_rx_done_cleanup(struct lll_sync *lll, uint8_t crc_ok, bool sync_
{
	struct event_done_extra *e;

	/* Reset Sync context association with any Aux context as the chain reception is done. */
	lll->lll_aux = NULL;

	/* Calculate and place the drift information in done event */
	e = ull_event_done_extra_get();
	LL_ASSERT(e);