Skip to content

Commit bfd297b

Browse files
Bluetooth: Controller: Move aux sync scanning to lll_sync
Periodic advertising train scanner implemented in lll_scan_aux adds lots of branches that cannot be compiled out with periodic advertising sync disabled. This commit moves sync parts of the code from lll_scan_aux to lll_sync. Signed-off-by: Andrzej Kaczmarek <[email protected]>
1 parent 8f695da commit bfd297b

File tree

8 files changed

+346
-204
lines changed

8 files changed

+346
-204
lines changed

subsys/bluetooth/controller/ll_sw/lll_scan_aux.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ int lll_scan_aux_reset(void);
99
void lll_scan_aux_prepare(void *param);
1010

1111
extern uint8_t ull_scan_aux_lll_handle_get(struct lll_scan_aux *lll);
12+
extern void *ull_scan_aux_lll_parent_get(struct lll_scan_aux *lll,
13+
uint8_t *is_lll_scan);

subsys/bluetooth/controller/ll_sw/lll_sync.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ struct lll_sync {
2929
uint32_t window_widening_event_us;
3030
uint32_t window_size_event_us;
3131

32-
/* temporary storage when aux scan was scheduled from LLL */
32+
/* used to store lll_aux when chain is being scanned */
3333
struct lll_scan_aux *lll_aux;
3434

3535
uint8_t phy:3;

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,10 +1455,12 @@ static int isr_rx_scan_report(struct lll_scan *lll, uint8_t rssi_ready,
14551455
phy_flags_rx);
14561456
ftr->phy_flags = phy_flags_rx;
14571457
ftr->aux_lll_sched =
1458-
lll_scan_aux_setup(lll, NULL, pdu_adv_rx,
1459-
lll->phy,
1460-
phy_flags_rx);
1458+
lll_scan_aux_setup(pdu_adv_rx, lll->phy,
1459+
phy_flags_rx,
1460+
lll_scan_aux_isr_aux_setup,
1461+
lll);
14611462
if (ftr->aux_lll_sched) {
1463+
lll->is_aux_sched = 1U;
14621464
err = -EBUSY;
14631465
}
14641466
}

0 commit comments

Comments
 (0)