Lines Matching full:handle
80 static void disable(uint16_t handle);
114 struct ll_conn_iso_group *ll_conn_iso_group_get(uint16_t handle) in ll_conn_iso_group_get() argument
116 return mem_get(cig_pool, sizeof(struct ll_conn_iso_group), handle); in ll_conn_iso_group_get()
159 struct ll_conn_iso_stream *ll_conn_iso_stream_get(uint16_t handle) in ll_conn_iso_stream_get() argument
161 return mem_get(cis_pool, sizeof(struct ll_conn_iso_stream), handle - in ll_conn_iso_stream_get()
165 struct lll_conn_iso_stream *ull_conn_iso_lll_stream_get(uint16_t handle) in ull_conn_iso_lll_stream_get() argument
169 cis = ll_conn_iso_stream_get(handle); in ull_conn_iso_lll_stream_get()
177 struct ll_conn_iso_stream *ll_iso_stream_connected_get(uint16_t handle) in ll_iso_stream_connected_get() argument
181 if (handle >= CONFIG_BT_CTLR_CONN_ISO_STREAMS + in ll_iso_stream_connected_get()
186 cis = ll_conn_iso_stream_get(handle); in ll_iso_stream_connected_get()
187 if ((cis->group == NULL) || (cis->lll.handle != handle) || !cis->established) { in ll_iso_stream_connected_get()
188 /* CIS does not belong to a group, has inconsistent handle or is in ll_iso_stream_connected_get()
220 uint16_t cis_handle = cis->lll.handle; in ll_conn_iso_stream_get_by_acl()
229 /* Look for iterator start handle */ in ll_conn_iso_stream_get_by_acl()
231 } else if (cis->lll.acl_handle == conn->lll.handle) { in ll_conn_iso_stream_get_by_acl()
250 uint16_t handle; in ll_conn_iso_stream_get_by_group() local
255 for (handle = handle_start; handle <= LL_CIS_HANDLE_LAST; handle++) { in ll_conn_iso_stream_get_by_group()
256 cis = ll_conn_iso_stream_get(handle); in ll_conn_iso_stream_get_by_group()
259 (*handle_iter) = handle; in ll_conn_iso_stream_get_by_group()
271 uint16_t handle; in ll_conn_iso_stream_get_by_id() local
273 for (handle = LL_CIS_HANDLE_BASE; handle <= LL_CIS_HANDLE_LAST; handle++) { in ll_conn_iso_stream_get_by_id()
274 cis = ll_conn_iso_stream_get(handle); in ll_conn_iso_stream_get_by_id()
317 uint16_t handle; in ull_conn_iso_lll_stream_sorted_get_by_group() local
340 for (handle = LL_CIS_HANDLE_BASE; handle <= LL_CIS_HANDLE_LAST; in ull_conn_iso_lll_stream_sorted_get_by_group()
341 handle++) { in ull_conn_iso_lll_stream_sorted_get_by_group()
344 /* Get CIS reference corresponding to loop handle */ in ull_conn_iso_lll_stream_sorted_get_by_group()
345 cis = ll_conn_iso_stream_get(handle); in ull_conn_iso_lll_stream_sorted_get_by_group()
365 (*handle_iter) = handle; in ull_conn_iso_lll_stream_sorted_get_by_group()
385 cis = ll_conn_iso_stream_get(cis_lll->handle); in ull_conn_iso_lll_group_get_by_stream()
413 ll_conn_iso_stream_get(cis_lll->handle); in ull_conn_iso_lll_cis_established()
429 node_rx->hdr.handle = cis->lll.acl_handle; in ull_conn_iso_lll_cis_established()
451 if (unlikely(lll->handle == 0xFFFF)) { in ull_conn_iso_done()
465 if (cis->lll.active && cis->lll.handle != LLL_HANDLE_INVALID) { in ull_conn_iso_done()
468 (1U << LL_CIS_IDX_FROM_HANDLE(cis->lll.handle))) { in ull_conn_iso_done()
483 * or CIS was not yet established, so handle timeout in ull_conn_iso_done()
633 uint16_t handle; in init_reset() local
637 for (handle = 0U; handle < CONFIG_BT_CTLR_CONN_ISO_GROUPS; handle++) { in init_reset()
638 disable(handle); in init_reset()
651 for (handle = 0; handle < CONFIG_BT_CTLR_CONN_ISO_GROUPS; handle++) { in init_reset()
652 cig = ll_conn_iso_group_get(handle); in init_reset()
658 for (handle = LL_CIS_HANDLE_BASE; handle <= LL_CIS_HANDLE_LAST; in init_reset()
659 handle++) { in init_reset()
660 cis = ll_conn_iso_stream_get(handle); in init_reset()
696 if (unlikely(cig->lll.handle == 0xFFFF)) { in ull_conn_iso_ticker_cb()
709 * event count until its handle is validated in in ull_conn_iso_ticker_cb()
713 if (cis->lll.handle != 0xFFFF && cis->lll.active) { in ull_conn_iso_ticker_cb()
724 ull_iso_lll_event_prepare(cis->lll.handle, cis->lll.event_count); in ull_conn_iso_ticker_cb()
791 /* Handle ISO Transmit Test for this CIG */ in ull_conn_iso_ticker_cb()
792 ull_conn_iso_transmit_test_cig_interval(cig->lll.handle, ticks_at_expire); in ull_conn_iso_ticker_cb()
841 cis->lll.handle = cis_handle; in ull_conn_iso_start()
892 * validated handle. in ull_conn_iso_start()
1007 /* FIXME: Handle latency due to skipped ACL events around the in ull_conn_iso_start()
1252 ll_remove_iso_path(cis->lll.handle, in cis_disabled_cb()
1254 ll_remove_iso_path(cis->lll.handle, in cis_disabled_cb()
1300 node_terminate->hdr.handle = cis->lll.handle; in cis_disabled_cb()
1314 if (cig->lll.resume_cis == cis->lll.handle) { in cis_disabled_cb()
1331 mfys[cig->lll.handle].param = &cis->lll; in cis_disabled_cb()
1333 TICKER_USER_ID_LLL, 1, &mfys[cig->lll.handle]); in cis_disabled_cb()
1371 cis = ll_conn_iso_stream_get(lll->handle); in cis_tx_lll_flush()
1375 lll_conn_iso_flush(lll->handle, lll); in cis_tx_lll_flush()
1381 ull_iso_lll_ack_enqueue(lll->handle, tx); in cis_tx_lll_flush()
1395 mfys[cig->lll.handle].param = &cig->lll; in cis_tx_lll_flush()
1397 TICKER_USER_ID_ULL_HIGH, 1, &mfys[cig->lll.handle]); in cis_tx_lll_flush()
1459 static void disable(uint16_t handle) in disable() argument
1464 cig = ll_conn_iso_group_get(handle); in disable()
1467 TICKER_ID_CONN_ISO_RESUME_BASE + handle, NULL, in disable()
1470 err = ull_ticker_stop_with_mark(TICKER_ID_CONN_ISO_BASE + handle, in disable()
1472 LL_ASSERT_INFO2(err == 0 || err == -EALREADY, handle, err); in disable()
1474 cig->lll.handle = LLL_HANDLE_INVALID; in disable()
1479 void ull_conn_iso_transmit_test_cig_interval(uint16_t handle, uint32_t ticks_at_expire) in ull_conn_iso_transmit_test_cig_interval() argument
1489 cig = ll_conn_iso_group_get(handle); in ull_conn_iso_transmit_test_cig_interval()
1510 /* Handle ISO Transmit Test for all active CISes in the group */ in ull_conn_iso_transmit_test_cig_interval()
1515 if (!cis->hdr.test_mode.tx.enabled || cis->lll.handle == LLL_HANDLE_INVALID) { in ull_conn_iso_transmit_test_cig_interval()
1537 ll_iso_transmit_test_send_sdu(cis->lll.handle, ticks_at_expire); in ull_conn_iso_transmit_test_cig_interval()