Skip to content

Commit

Permalink
Bluetooth: controller: Stop Sync ISO ticker when establishment fails
Browse files Browse the repository at this point in the history
When an ISO stream fails to sync to a broadcaster within the first 6
events, the establishment fails (as expected). However, it did not stop
the ticker, and subsequently it was impossible to establish a new sync
after this.

Make asynchronous call to ticker_stop when establishment fails, and exit
done handling. Cleanup is handled via ll_rx_dequeue().

Signed-off-by: Morten Priess <mtpr@oticon.com>
  • Loading branch information
mtpr-ot authored and carlescufi committed Aug 5, 2024
1 parent 0e6bb8a commit 64facee
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions subsys/bluetooth/controller/ll_sw/ull_sync_iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,23 @@ void ull_sync_iso_done(struct node_rx_event_done *done)
elapsed_event = latency_event + 1U;
}

/* Check for establishmet failure */
if (done->extra.estab_failed) {
uint8_t handle;
uint32_t ret;

/* Stop Sync ISO Ticker directly. Establishment failure has been
* notified.
*/
handle = sync_iso_handle_get(sync_iso);
ret = ticker_stop(TICKER_INSTANCE_ID_CTLR, TICKER_USER_ID_ULL_HIGH,
(TICKER_ID_SCAN_SYNC_ISO_BASE +
sync_iso_handle_to_index(handle)), NULL, NULL);
LL_ASSERT((ret == TICKER_STATUS_SUCCESS) ||
(ret == TICKER_STATUS_BUSY));
return;
}

/* Sync drift compensation and new skip calculation
*/
ticks_drift_plus = 0U;
Expand Down

0 comments on commit 64facee

Please sign in to comment.