Lines Matching full:scan
147 static inline struct ll_sync_set *sync_create_get(struct ll_scan_set *scan) in sync_create_get() argument
150 return (!scan->periodic.cancelled) ? scan->periodic.sync : NULL; in sync_create_get()
184 struct ll_scan_set *scan; in ull_scan_aux_setup() local
219 scan = HDR_LLL2ULL(lll); in ull_scan_aux_setup()
220 sync = sync_create_get(scan); in ull_scan_aux_setup()
224 ull_scan_handle_get(scan); in ull_scan_aux_setup()
238 scan = HDR_LLL2ULL(lll); in ull_scan_aux_setup()
239 sync = sync_create_get(scan); in ull_scan_aux_setup()
243 ull_scan_handle_get(scan); in ull_scan_aux_setup()
253 /* Node has valid aux context so its scan was scheduled in ull_scan_aux_setup()
271 * valid scan set was scheduled from LLL. in ull_scan_aux_setup()
306 scan = HDR_LLL2ULL(lll); in ull_scan_aux_setup()
307 sync = (void *)scan; in ull_scan_aux_setup()
308 scan = ull_scan_is_valid_get(scan); in ull_scan_aux_setup()
309 if (scan) { in ull_scan_aux_setup()
313 scan = NULL; in ull_scan_aux_setup()
318 if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) || scan) { in ull_scan_aux_setup()
320 sync = sync_create_get(scan); in ull_scan_aux_setup()
340 /* Backup scan requested flag as it is in union with in ull_scan_aux_setup()
356 * reuse the existing aux context to scan the chain. in ull_scan_aux_setup()
386 scan = NULL; in ull_scan_aux_setup()
451 if (sync && (scan->periodic.state != LL_SYNC_STATE_CREATED)) { in ull_scan_aux_setup()
454 ull_sync_setup_addr_check(sync, scan, pdu->tx_addr, ptr, in ull_scan_aux_setup()
457 ull_sync_setup_addr_check(sync, scan, pdu->tx_addr, ptr, 0U); in ull_scan_aux_setup()
497 ull_sync_setup_sid_match(sync, scan, PDU_ADV_ADI_SID_GET(adi))) { in ull_scan_aux_setup()
498 ull_sync_setup(scan, aux->lll.phy, rx, si); in ull_scan_aux_setup()
618 /* Calculate the aux offset from start of the scan window */ in ull_scan_aux_setup()
720 /* In sync context we can dispatch rx immediately, in scan context we in ull_scan_aux_setup()
721 * enqueue rx in aux context and will flush them after scan is complete. in ull_scan_aux_setup()
764 * in global scan struct so we can pick it when scanned node is received in ull_scan_aux_setup()
782 /* check scan context is not already using LLL in ull_scan_aux_setup()
788 /* Associate Scan context with the Aux context so that in ull_scan_aux_setup()
799 /* Reset auxiliary channel PDU scan state which otherwise is in ull_scan_aux_setup()
809 LL_ASSERT(scan); in ull_scan_aux_setup()
811 /* Do not ULL schedule if scan disable requested */ in ull_scan_aux_setup()
812 if (unlikely(scan->is_stop)) { in ull_scan_aux_setup()
874 /* Yield the primary scan window or auxiliary or periodic sync event in ull_scan_aux_setup()
917 if (sync && (scan->periodic.state != LL_SYNC_STATE_CREATED)) { in ull_scan_aux_setup()
918 scan->periodic.state = LL_SYNC_STATE_IDLE; in ull_scan_aux_setup()
927 LL_ASSERT(scan); in ull_scan_aux_setup()
929 /* If scan is being disabled, rx could already be in ull_scan_aux_setup()
936 if (unlikely(scan->is_stop)) { in ull_scan_aux_setup()
941 * chain is received and at the same time scan in ull_scan_aux_setup()
1005 struct ll_scan_set *scan; in ull_scan_aux_done() local
1011 scan = HDR_LLL2ULL(lll); in ull_scan_aux_done()
1012 LL_ASSERT(ull_scan_is_valid_get(scan)); in ull_scan_aux_done()
1015 if (unlikely(scan->is_stop)) { in ull_scan_aux_done()
1049 struct ll_scan_set *scan; in ull_scan_aux_lll_parent_get() local
1055 scan = HDR_LLL2ULL(lllscan); in ull_scan_aux_lll_parent_get()
1056 *is_lll_scan = !!ull_scan_is_valid_get(scan); in ull_scan_aux_lll_parent_get()
1140 struct ll_scan_set *scan; in ull_scan_aux_release() local
1148 scan = HDR_LLL2ULL(lll); in ull_scan_aux_release()
1149 scan = ull_scan_is_valid_get(scan); in ull_scan_aux_release()
1150 if (scan) { in ull_scan_aux_release()
1151 is_stop = scan->is_stop; in ull_scan_aux_release()
1166 } else if (!scan) { in ull_scan_aux_release()
1194 /* Stop any ULL scheduling of auxiliary PDU scan */ in ull_scan_aux_stop()
1212 /* ULL scan auxiliary PDU reception scheduling stopped in ull_scan_aux_stop()
1218 struct ll_scan_set *scan; in ull_scan_aux_stop() local
1224 scan = HDR_LLL2ULL(lll); in ull_scan_aux_stop()
1225 scan = ull_scan_is_valid_get(scan); in ull_scan_aux_stop()
1226 if (scan) { in ull_scan_aux_stop()
1227 /* ULL scan auxiliary PDU reception scheduling stopped in ull_scan_aux_stop()
1265 /* Clear the parent so that when scan is being disabled then this in aux_release()
1328 struct ll_scan_set *scan; in flush() local
1362 scan = HDR_LLL2ULL(lll); in flush()
1363 scan = ull_scan_is_valid_get(scan); in flush()
1364 if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) || scan) { in flush()
1534 struct ll_scan_set *scan; in ull_scan_aux_setup() local
1567 scan = HDR_LLL2ULL(lll); in ull_scan_aux_setup()
1568 sync = sync_create_get(scan); in ull_scan_aux_setup()
1583 scan = HDR_LLL2ULL(lll); in ull_scan_aux_setup()
1584 sync = sync_create_get(scan); in ull_scan_aux_setup()
1595 /* Node has valid chain context so its scan was scheduled in ull_scan_aux_setup()
1610 * valid scan set was scheduled from LLL. We can in ull_scan_aux_setup()
1637 scan = HDR_LLL2ULL(lll); in ull_scan_aux_setup()
1638 sync = (void *)scan; in ull_scan_aux_setup()
1639 scan = ull_scan_is_valid_get(scan); in ull_scan_aux_setup()
1640 if (scan) { in ull_scan_aux_setup()
1644 scan = NULL; in ull_scan_aux_setup()
1649 if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) || scan) { in ull_scan_aux_setup()
1651 sync = sync_create_get(scan); in ull_scan_aux_setup()
1671 /* Backup scan requested flag as it is in union with in ull_scan_aux_setup()
1687 * reuse the existing aux context to scan the chain. in ull_scan_aux_setup()
1717 scan = NULL; in ull_scan_aux_setup()
1785 if (sync && (scan->periodic.state != LL_SYNC_STATE_CREATED)) { in ull_scan_aux_setup()
1788 ull_sync_setup_addr_check(sync, scan, pdu->tx_addr, ptr, in ull_scan_aux_setup()
1791 ull_sync_setup_addr_check(sync, scan, pdu->tx_addr, ptr, 0U); in ull_scan_aux_setup()
1831 ull_sync_setup_sid_match(sync, scan, PDU_ADV_ADI_SID_GET(adi))) { in ull_scan_aux_setup()
1832 ull_sync_setup(scan, chain->lll.phy, rx, si); in ull_scan_aux_setup()
1900 * or if scanning and scan has been stopped in ull_scan_aux_setup()
1948 /* Calculate the aux offset from start of the scan window */ in ull_scan_aux_setup()
2024 * in global scan/sync struct so we can pick it when scanned node is received in ull_scan_aux_setup()
2035 /* Reset auxiliary channel PDU scan state which otherwise is in ull_scan_aux_setup()
2059 /* In sync context we can dispatch rx immediately, in scan context we in ull_scan_aux_setup()
2060 * enqueue rx in aux context and will flush them after scan is complete. in ull_scan_aux_setup()
2062 if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) || scan) { in ull_scan_aux_setup()
2094 LL_ASSERT(scan); in ull_scan_aux_setup()
2096 /* Do not ULL schedule if scan disable requested */ in ull_scan_aux_setup()
2097 if (unlikely(scan->is_stop)) { in ull_scan_aux_setup()
2101 /* Remove auxiliary context association with scan context so in ull_scan_aux_setup()
2154 if (sync && (scan->periodic.state != LL_SYNC_STATE_CREATED)) { in ull_scan_aux_setup()
2155 scan->periodic.state = LL_SYNC_STATE_IDLE; in ull_scan_aux_setup()
2164 LL_ASSERT(scan); in ull_scan_aux_setup()
2225 struct ll_scan_set *scan; in ull_scan_aux_lll_parent_get() local
2231 scan = HDR_LLL2ULL(lllscan); in ull_scan_aux_lll_parent_get()
2232 *is_lll_scan = !!ull_scan_is_valid_get(scan); in ull_scan_aux_lll_parent_get()
2311 struct ll_scan_set *scan; in ull_scan_aux_release() local
2319 scan = HDR_LLL2ULL(lll); in ull_scan_aux_release()
2320 scan = ull_scan_is_valid_get(scan); in ull_scan_aux_release()
2321 if (scan) { in ull_scan_aux_release()
2322 is_stop = scan->is_stop; in ull_scan_aux_release()
2404 /* Disable called by parent disable or race with scan stop */ in scan_aux_stop_all_chains_for_parent()
2455 /* Initialize scan aux chains pool */ in init_reset()
2470 /* Clear the parent so that when scan is being disabled then this in aux_chain_release()
2521 struct ll_scan_set *scan; in flush() local
2535 scan = HDR_LLL2ULL(lll); in flush()
2536 scan = ull_scan_is_valid_get(scan); in flush()
2539 if (!scan && chain->aux_sched) { in flush()
2554 if (!scan) { in flush()
2571 if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) || scan) { in flush()
2642 struct ll_scan_set *scan = HDR_LLL2ULL(chain->parent); in chain_start_ticker() local
2645 ull_scan_handle_get(scan); in chain_start_ticker()
2690 /* Yield the primary scan window or auxiliary or periodic sync event in chain_start_ticker()