Skip to content

Commit 922bab6

Browse files
cvinayakmbolivar-nordic
authored andcommitted
[nrf fromtree] Bluetooth: Controller: Fix auxiliary context release on scan done
Fix auxiliary context release on scan done, do not wait for reference count to reduce when Periodic Sync events overlap. Regression introduced in commit 624e003 ("Bluetooth: controller: Fix auxiliary scan context release"). Signed-off-by: Vinayak Kariappa Chettimada <[email protected]> (cherry picked from commit 4591c01) (cherry picked from commit 8e80aed)
1 parent 93f8326 commit 922bab6

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,6 @@ void ull_scan_aux_setup(memq_link_t *link, struct node_rx_hdr *rx)
746746
void ull_scan_aux_done(struct node_rx_event_done *done)
747747
{
748748
struct ll_scan_aux_set *aux;
749-
struct ull_hdr *hdr;
750749

751750
/* Get reference to ULL context */
752751
aux = CONTAINER_OF(done->param, struct ll_scan_aux_set, ull);
@@ -757,8 +756,8 @@ void ull_scan_aux_done(struct node_rx_event_done *done)
757756

758757
sync = CONTAINER_OF(done->param, struct ll_sync_set, ull);
759758
LL_ASSERT(ull_sync_is_valid_get(sync));
760-
hdr = &sync->ull;
761759

760+
/* Auxiliary context will be flushed by ull_scan_aux_stop() */
762761
if (unlikely(sync->is_stop) || !sync->lll.lll_aux) {
763762
return;
764763
}
@@ -778,18 +777,9 @@ void ull_scan_aux_done(struct node_rx_event_done *done)
778777
if (unlikely(scan->is_stop)) {
779778
return;
780779
}
781-
782-
/* Setup the disabled callback to flush the auxiliary PDUs */
783-
hdr = &aux->ull;
784780
}
785781

786-
if (ull_ref_get(hdr) == 0U) {
787-
flush(aux);
788-
} else {
789-
LL_ASSERT(!hdr->disabled_cb);
790-
hdr->disabled_param = aux;
791-
hdr->disabled_cb = done_disabled_cb;
792-
}
782+
flush(aux);
793783
}
794784

795785
struct ll_scan_aux_set *ull_scan_aux_set_get(uint8_t handle)

0 commit comments

Comments
 (0)