Lines Matching refs:aux
73 static inline void aux_release(struct ll_scan_aux_set *aux);
74 static inline uint8_t aux_handle_get(struct ll_scan_aux_set *aux);
177 struct ll_scan_aux_set *aux; in ull_scan_aux_setup() local
211 aux = NULL; in ull_scan_aux_setup()
230 aux = NULL; in ull_scan_aux_setup()
257 aux = HDR_LLL2ULL(lll_aux); in ull_scan_aux_setup()
260 lll = aux->parent; in ull_scan_aux_setup()
264 aux_handle_get(aux); in ull_scan_aux_setup()
284 aux = HDR_LLL2ULL(lll_aux); in ull_scan_aux_setup()
285 LL_ASSERT(lll == aux->parent); in ull_scan_aux_setup()
299 aux = HDR_LLL2ULL(lll_aux); in ull_scan_aux_setup()
300 LL_ASSERT(sync_lll == aux->parent); in ull_scan_aux_setup()
385 aux = NULL; in ull_scan_aux_setup()
426 } else if (aux) { in ull_scan_aux_setup()
427 aux->data_len += data_len; in ull_scan_aux_setup()
428 ftr->aux_data_len = aux->data_len; in ull_scan_aux_setup()
496 if (IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) && aux && sync && adi && in ull_scan_aux_setup()
498 ull_sync_setup(scan, aux->lll.phy, rx, si); in ull_scan_aux_setup()
570 } else if (aux) { in ull_scan_aux_setup()
571 aux->data_len += data_len; in ull_scan_aux_setup()
572 ftr->aux_data_len = aux->data_len; in ull_scan_aux_setup()
578 LL_ASSERT(aux && aux->rx_last); in ull_scan_aux_setup()
580 aux->rx_last->rx_ftr.extra = rx; in ull_scan_aux_setup()
581 aux->rx_last = rx; in ull_scan_aux_setup()
652 if (!aux) { in ull_scan_aux_setup()
653 aux = aux_acquire(); in ull_scan_aux_setup()
654 if (!aux) { in ull_scan_aux_setup()
679 aux->rx_head = aux->rx_last = NULL; in ull_scan_aux_setup()
680 aux->data_len = data_len; in ull_scan_aux_setup()
681 lll_aux = &aux->lll; in ull_scan_aux_setup()
684 ull_hdr_init(&aux->ull); in ull_scan_aux_setup()
685 lll_hdr_init(lll_aux, aux); in ull_scan_aux_setup()
687 aux->parent = lll ? (void *)lll : (void *)sync_lll; in ull_scan_aux_setup()
695 aux->rx_incomplete = rx_incomplete; in ull_scan_aux_setup()
700 aux->data_len += data_len; in ull_scan_aux_setup()
706 if (aux->data_len >= CONFIG_BT_CTLR_SCAN_DATA_LEN_MAX) { in ull_scan_aux_setup()
748 if (aux->rx_last) { in ull_scan_aux_setup()
749 aux->rx_last->rx_ftr.extra = rx; in ull_scan_aux_setup()
751 aux->rx_head = rx; in ull_scan_aux_setup()
753 aux->rx_last = rx; in ull_scan_aux_setup()
755 ftr->aux_data_len = aux->data_len; in ull_scan_aux_setup()
839 aux->rx_head = rx; in ull_scan_aux_setup()
843 aux->ull.ticks_active_to_start = 0; in ull_scan_aux_setup()
844 aux->ull.ticks_prepare_to_start = in ull_scan_aux_setup()
846 aux->ull.ticks_preempt_to_start = in ull_scan_aux_setup()
848 aux->ull.ticks_slot = HAL_TICKER_US_TO_TICKS_CEIL( in ull_scan_aux_setup()
853 ticks_slot_offset = MAX(aux->ull.ticks_active_to_start, in ull_scan_aux_setup()
854 aux->ull.ticks_prepare_to_start); in ull_scan_aux_setup()
889 aux_handle = aux_handle_get(aux); in ull_scan_aux_setup()
898 (aux->ull.ticks_slot + in ull_scan_aux_setup()
900 ticker_cb, aux, ticker_op_cb, aux); in ull_scan_aux_setup()
922 if (aux) { in ull_scan_aux_setup()
926 if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) || aux->rx_last) { in ull_scan_aux_setup()
944 if (aux->rx_last != rx) { in ull_scan_aux_setup()
945 aux->rx_last->rx_ftr.extra = rx; in ull_scan_aux_setup()
946 aux->rx_last = rx; in ull_scan_aux_setup()
952 aux->rx_last->rx_ftr.extra = rx; in ull_scan_aux_setup()
953 aux->rx_last = rx; in ull_scan_aux_setup()
967 LL_ASSERT(aux->parent); in ull_scan_aux_setup()
969 flush_safe(aux); in ull_scan_aux_setup()
985 struct ll_scan_aux_set *aux; in ull_scan_aux_done() local
988 aux = CONTAINER_OF(done->param, struct ll_scan_aux_set, ull); in ull_scan_aux_done()
991 !ull_scan_aux_is_valid_get(aux)) { in ull_scan_aux_done()
1002 aux = HDR_LLL2ULL(sync->lll.lll_aux); in ull_scan_aux_done()
1003 LL_ASSERT(aux->parent); in ull_scan_aux_done()
1008 lll = aux->parent; in ull_scan_aux_done()
1020 flush(aux); in ull_scan_aux_done()
1034 struct ll_scan_aux_set *aux; in ull_scan_aux_lll_handle_get() local
1036 aux = HDR_LLL2ULL(lll); in ull_scan_aux_lll_handle_get()
1038 return aux_handle_get(aux); in ull_scan_aux_lll_handle_get()
1044 struct ll_scan_aux_set *aux; in ull_scan_aux_lll_parent_get() local
1046 aux = HDR_LLL2ULL(lll); in ull_scan_aux_lll_parent_get()
1052 lllscan = aux->parent; in ull_scan_aux_lll_parent_get()
1059 return aux->parent; in ull_scan_aux_lll_parent_get()
1062 struct ll_scan_aux_set *ull_scan_aux_is_valid_get(struct ll_scan_aux_set *aux) in ull_scan_aux_is_valid_get() argument
1064 if (((uint8_t *)aux < (uint8_t *)ll_scan_aux_pool) || in ull_scan_aux_is_valid_get()
1065 ((uint8_t *)aux > ((uint8_t *)ll_scan_aux_pool + in ull_scan_aux_is_valid_get()
1071 return aux; in ull_scan_aux_is_valid_get()
1076 struct ll_scan_aux_set *aux; in ull_scan_aux_lll_is_valid_get() local
1078 aux = HDR_LLL2ULL(lll); in ull_scan_aux_lll_is_valid_get()
1079 aux = ull_scan_aux_is_valid_get(aux); in ull_scan_aux_lll_is_valid_get()
1080 if (aux) { in ull_scan_aux_lll_is_valid_get()
1081 return &aux->lll; in ull_scan_aux_lll_is_valid_get()
1139 struct ll_scan_aux_set *aux; in ull_scan_aux_release() local
1144 aux = HDR_LLL2ULL(lll_aux); in ull_scan_aux_release()
1145 lll = aux->parent; in ull_scan_aux_release()
1162 LL_ASSERT(aux->parent); in ull_scan_aux_release()
1164 flush_safe(aux); in ull_scan_aux_release()
1171 if (aux->rx_last) { in ull_scan_aux_release()
1172 aux->rx_last->rx_ftr.extra = rx; in ull_scan_aux_release()
1174 aux->rx_head = rx; in ull_scan_aux_release()
1176 aux->rx_last = rx; in ull_scan_aux_release()
1186 int ull_scan_aux_stop(struct ll_scan_aux_set *aux) in ull_scan_aux_stop() argument
1195 aux_handle = aux_handle_get(aux); in ull_scan_aux_stop()
1197 aux, &aux->lll); in ull_scan_aux_stop()
1204 err = ull_disable(&aux->lll); in ull_scan_aux_stop()
1221 lll = aux->parent; in ull_scan_aux_stop()
1240 mfy.param = aux; in ull_scan_aux_stop()
1263 static inline void aux_release(struct ll_scan_aux_set *aux) in aux_release() argument
1268 LL_ASSERT(aux->parent); in aux_release()
1269 aux->parent = NULL; in aux_release()
1271 mem_release(aux, &scan_aux_free); in aux_release()
1274 static inline uint8_t aux_handle_get(struct ll_scan_aux_set *aux) in aux_handle_get() argument
1276 return mem_index_get(aux, ll_scan_aux_pool, in aux_handle_get()
1282 struct ll_scan_aux_set *aux; in done_disabled_cb() local
1284 aux = param; in done_disabled_cb()
1285 LL_ASSERT(aux->parent); in done_disabled_cb()
1287 flush(aux); in done_disabled_cb()
1292 struct ll_scan_aux_set *aux; in flush_safe() local
1296 aux = param; in flush_safe()
1297 LL_ASSERT(aux->parent); in flush_safe()
1308 hdr = &aux->ull; in flush_safe()
1311 flush(aux); in flush_safe()
1320 hdr->disabled_param = aux; in flush_safe()
1327 struct ll_scan_aux_set *aux; in flush() local
1336 aux = param; in flush()
1337 LL_ASSERT(aux->parent); in flush()
1339 rx = aux->rx_head; in flush()
1341 aux->rx_head = NULL; in flush()
1348 rx = aux->rx_incomplete; in flush()
1350 aux->rx_incomplete = NULL; in flush()
1361 lll = aux->parent; in flush()
1366 lll->scan_aux_score = aux->lll.hdr.score; in flush()
1370 aux_release(aux); in flush()
1375 struct ll_scan_aux_set *aux; in aux_sync_partial() local
1378 aux = param; in aux_sync_partial()
1379 rx = aux->rx_head; in aux_sync_partial()
1380 aux->rx_head = NULL; in aux_sync_partial()
1391 struct ll_scan_aux_set *aux; in aux_sync_incomplete() local
1393 aux = param; in aux_sync_incomplete()
1394 LL_ASSERT(aux->parent); in aux_sync_incomplete()
1399 if (!aux->rx_head) { in aux_sync_incomplete()
1405 lll = aux->parent; in aux_sync_incomplete()
1413 rx = aux->rx_incomplete; in aux_sync_incomplete()
1415 aux->rx_incomplete = NULL; in aux_sync_incomplete()
1431 aux->rx_head = rx; in aux_sync_incomplete()
1434 LL_ASSERT(!ull_ref_get(&aux->ull)); in aux_sync_incomplete()
1436 flush(aux); in aux_sync_incomplete()
1446 struct ll_scan_aux_set *aux = param; in ticker_cb() local
1454 ref = ull_ref_inc(&aux->ull); in ticker_cb()
1462 p.param = &aux->lll; in ticker_cb()
1481 struct ll_scan_aux_set *aux; in ticker_op_cb() local
1484 aux = param; in ticker_op_cb()
1485 sync_lll = aux->parent; in ticker_op_cb()
1504 struct ll_scan_aux_set *aux; in ticker_op_cb() local
1506 aux = param; in ticker_op_cb()
1507 LL_ASSERT(aux->parent); in ticker_op_cb()