Lines Matching full:cis

62 		LOG_ERR("Unknown CIS handle %u", handle);  in ll_cis_get_acl_awaiting_reply()
150 /* Use this function to release CIS/CIG resources on an aborted CIS setup
151 * ie if CIS setup is 'cancelled' after call to ull_peripheral_iso_acquire()
152 * because of a rejection of the CIS request
156 struct ll_conn_iso_stream *cis; in ull_peripheral_iso_release() local
159 cis = ll_conn_iso_stream_get(cis_handle); in ull_peripheral_iso_release()
160 LL_ASSERT(cis); in ull_peripheral_iso_release()
162 cig = cis->group; in ull_peripheral_iso_release()
164 ll_conn_iso_stream_release(cis); in ull_peripheral_iso_release()
177 struct ll_conn_iso_stream *cis; in ull_peripheral_iso_acquire() local
203 * does not take into account that leading CIS with NSE>=3 must reduce in ull_peripheral_iso_acquire()
218 /* No space in CIG for new CIS */ in ull_peripheral_iso_acquire()
224 cis = ll_iso_stream_connected_get(handle); in ull_peripheral_iso_acquire()
225 if (cis && cis->group && cis->cis_id == req->cis_id) { in ull_peripheral_iso_acquire()
226 /* CIS ID already in use */ in ull_peripheral_iso_acquire()
231 /* Acquire new CIS */ in ull_peripheral_iso_acquire()
232 cis = ll_conn_iso_stream_acquire(); in ull_peripheral_iso_acquire()
233 if (cis == NULL) { in ull_peripheral_iso_acquire()
235 /* No CIS's in CIG, so this was just allocated in ull_peripheral_iso_acquire()
240 /* No space for new CIS */ in ull_peripheral_iso_acquire()
248 cis->cis_id = req->cis_id; in ull_peripheral_iso_acquire()
249 cis->framed = (req->c_max_sdu_packed[1] & BIT(7)) >> 7; in ull_peripheral_iso_acquire()
250 cis->established = 0; in ull_peripheral_iso_acquire()
251 cis->group = cig; in ull_peripheral_iso_acquire()
252 cis->teardown = 0; in ull_peripheral_iso_acquire()
253 cis->released_cb = NULL; in ull_peripheral_iso_acquire()
254 cis->c_max_sdu = (uint16_t)(req->c_max_sdu_packed[1] & 0x0F) << 8 | in ull_peripheral_iso_acquire()
256 cis->p_max_sdu = (uint16_t)(req->p_max_sdu[1] & 0x0F) << 8 | in ull_peripheral_iso_acquire()
259 cis->lll.active = 0U; in ull_peripheral_iso_acquire()
260 cis->lll.handle = LLL_HANDLE_INVALID; in ull_peripheral_iso_acquire()
261 cis->lll.acl_handle = acl->lll.handle; in ull_peripheral_iso_acquire()
262 cis->lll.sub_interval = sys_get_le24(req->sub_interval); in ull_peripheral_iso_acquire()
263 cis->lll.nse = req->nse; in ull_peripheral_iso_acquire()
265 cis->lll.rx.phy = req->c_phy; in ull_peripheral_iso_acquire()
266 cis->lll.rx.phy_flags = PHY_FLAGS_S8; in ull_peripheral_iso_acquire()
267 cis->lll.rx.bn = req->c_bn; in ull_peripheral_iso_acquire()
268 cis->lll.rx.ft = req->c_ft; in ull_peripheral_iso_acquire()
269 cis->lll.rx.max_pdu = sys_le16_to_cpu(req->c_max_pdu); in ull_peripheral_iso_acquire()
271 cis->lll.tx.phy = req->p_phy; in ull_peripheral_iso_acquire()
272 cis->lll.tx.phy_flags = PHY_FLAGS_S8; in ull_peripheral_iso_acquire()
273 cis->lll.tx.bn = req->p_bn; in ull_peripheral_iso_acquire()
274 cis->lll.tx.ft = req->p_ft; in ull_peripheral_iso_acquire()
275 cis->lll.tx.max_pdu = sys_le16_to_cpu(req->p_max_pdu); in ull_peripheral_iso_acquire()
277 if (!cis->lll.link_tx_free) { in ull_peripheral_iso_acquire()
278 cis->lll.link_tx_free = &cis->lll.link_tx; in ull_peripheral_iso_acquire()
281 memq_init(cis->lll.link_tx_free, &cis->lll.memq_tx.head, in ull_peripheral_iso_acquire()
282 &cis->lll.memq_tx.tail); in ull_peripheral_iso_acquire()
283 cis->lll.link_tx_free = NULL; in ull_peripheral_iso_acquire()
285 *cis_handle = ll_conn_iso_stream_handle_get(cis); in ull_peripheral_iso_acquire()
295 struct ll_conn_iso_stream *cis = NULL; in ull_peripheral_iso_setup() local
309 cis = ll_conn_iso_stream_get(cis_handle); in ull_peripheral_iso_setup()
310 if (!cis) { in ull_peripheral_iso_setup()
314 conn = ll_conn_get(cis->lll.acl_handle); in ull_peripheral_iso_setup()
320 /* This is the first CIS. Make sure we can make the anchorpoint, otherwise in ull_peripheral_iso_setup()
330 cis->sync_delay = sys_get_le24(ind->cis_sync_delay); in ull_peripheral_iso_setup()
331 cis->offset = cis_offset; in ull_peripheral_iso_setup()
332 memcpy(cis->lll.access_addr, ind->aa, sizeof(ind->aa)); in ull_peripheral_iso_setup()
334 cis->pkt_seq_num = 0U; in ull_peripheral_iso_setup()
336 cis->lll.event_count = LLL_CONN_ISO_EVENT_COUNT_MAX; in ull_peripheral_iso_setup()
337 cis->lll.next_subevent = 0U; in ull_peripheral_iso_setup()
338 cis->lll.tifs_us = conn->lll.tifs_cis_us; in ull_peripheral_iso_setup()
339 cis->lll.sn = 0U; in ull_peripheral_iso_setup()
340 cis->lll.nesn = 0U; in ull_peripheral_iso_setup()
341 cis->lll.cie = 0U; in ull_peripheral_iso_setup()
342 cis->lll.npi = 0U; in ull_peripheral_iso_setup()
343 cis->lll.flush = LLL_CIS_FLUSH_NONE; in ull_peripheral_iso_setup()
344 cis->lll.datapath_ready_rx = 0U; in ull_peripheral_iso_setup()
345 cis->lll.tx.payload_count = 0U; in ull_peripheral_iso_setup()
346 cis->lll.rx.payload_count = 0U; in ull_peripheral_iso_setup()
347 cis->lll.rx.bn_curr = 1U; in ull_peripheral_iso_setup()
348 cis->lll.tx.bn_curr = 1U; in ull_peripheral_iso_setup()
396 struct ll_conn_iso_stream *cis; in ull_peripheral_iso_update_peer_sca() local
403 cis = ll_conn_iso_stream_get_by_group(cig, NULL); in ull_peripheral_iso_update_peer_sca()
404 LL_ASSERT(cis); in ull_peripheral_iso_update_peer_sca()
406 uint16_t cis_handle = cis->lll.handle; in ull_peripheral_iso_update_peer_sca()
408 cis = ll_iso_stream_connected_get(cis_handle); in ull_peripheral_iso_update_peer_sca()
409 if (!cis) { in ull_peripheral_iso_update_peer_sca()
413 if (cis->lll.acl_handle == acl->lll.handle) { in ull_peripheral_iso_update_peer_sca()