Lines Matching +full:validity +full:- +full:control
5 * SPDX-License-Identifier: Apache-2.0
126 * tree) 'recv blocking' API to the normal single-receiver
131 struct hci_driver_data *data = dev->data; in bt_recv_prio()
134 struct bt_hci_evt_hdr *hdr = (void *)buf->data; in bt_recv_prio()
135 uint8_t evt_flags = bt_hci_evt_get_flags(hdr->evt); in bt_recv_prio()
144 return data->recv(dev, buf); in bt_recv_prio()
164 sdu_buffer->dbuf = buf; in sink_sdu_alloc_hci()
165 sdu_buffer->size = net_buf_tailroom(buf); in sink_sdu_alloc_hci()
179 struct hci_driver_data *data = dev->data; in sink_sdu_emit_hci()
191 buf = (struct net_buf *) sdu_frag->sdu.contents.dbuf; in sink_sdu_emit_hci()
196 if (sdu_frag->sdu.status != ISOAL_SDU_STATUS_VALID) { in sink_sdu_emit_hci()
204 pb = sdu_frag->sdu_state; in sink_sdu_emit_hci()
205 len = sdu_frag->sdu_frag_size; in sink_sdu_emit_hci()
206 total_len = sdu->total_sdu_size; in sink_sdu_emit_hci()
207 packet_status_flag = sdu->collated_status; in sink_sdu_emit_hci()
216 if (len > 0 && buf->len >= len) { in sink_sdu_emit_hci()
246 sdu_hdr->ts = sys_cpu_to_le32((uint32_t) sdu_frag->sdu.timestamp); in sink_sdu_emit_hci()
247 sdu_hdr->sdu.sn = sys_cpu_to_le16((uint16_t) sdu_frag->sdu.sn); in sink_sdu_emit_hci()
248 sdu_hdr->sdu.slen = sys_cpu_to_le16(slen_packed); in sink_sdu_emit_hci()
255 handle = sink_ctx->session.handle; in sink_sdu_emit_hci()
258 hdr->handle = sys_cpu_to_le16(handle_packed); in sink_sdu_emit_hci()
259 hdr->len = sys_cpu_to_le16(len); in sink_sdu_emit_hci()
262 data->recv(dev, buf); in sink_sdu_emit_hci()
288 * initialize the queue. As the Tx thread and Rx thread are co-operative in hci_recv_fifo_reset()
303 if (node_rx->hdr.user_meta == HCI_CLASS_EVT_CONNECTION) { in process_prio_evt()
305 struct pdu_data *pdu_data = (void *)node_rx->pdu; in process_prio_evt()
307 handle = node_rx->hdr.handle; in process_prio_evt()
308 if (node_rx->hdr.type == NODE_RX_TYPE_TERMINATE) { in process_prio_evt()
352 node_rx->hdr.user_meta = hci_get_class(node_rx); in prio_recv_thread()
387 node_rx->hdr.user_meta = hci_get_class(node_rx); in prio_recv_thread()
393 node_rx->hdr.next = NULL; in prio_recv_thread()
425 * Blocking-take of the semaphore; we take it once ULL mayfly in prio_recv_thread()
467 } else if (IS_CIS_HANDLE(node_rx->hdr.handle)) { in encode_node()
470 cis = ll_conn_iso_stream_get(node_rx->hdr.handle); in encode_node()
471 if (cis && !cis->teardown) { in encode_node()
475 hdr = &cis->hdr; in encode_node()
476 dp = hdr->datapath_out; in encode_node()
477 if (dp && dp->path_id == BT_HCI_DATAPATH_ID_HCI) { in encode_node()
480 .meta = &node_rx->rx_iso_meta, in encode_node()
481 .pdu = (void *)&node_rx->pdu[0], in encode_node()
484 /* Pass the ISO PDU through ISO-AL */ in encode_node()
486 isoal_rx_pdu_recombine(dp->sink_hdl, &pckt_meta); in encode_node()
495 } else if (IS_SYNC_ISO_HANDLE(node_rx->hdr.handle)) { in encode_node()
501 stream_handle = LL_BIS_SYNC_IDX_FROM_HANDLE(node_rx->hdr.handle); in encode_node()
504 /* Check validity of the data path sink. FIXME: A channel disconnect race in encode_node()
507 if (stream && stream->dp && in encode_node()
508 (stream->dp->path_id == BT_HCI_DATAPATH_ID_HCI)) { in encode_node()
509 isoal_rx.meta = &node_rx->rx_iso_meta; in encode_node()
510 isoal_rx.pdu = (void *)node_rx->pdu; in encode_node()
511 err = isoal_rx_pdu_recombine(stream->dp->sink_hdl, &isoal_rx); in encode_node()
522 node_rx->hdr.next = NULL; in encode_node()
534 node_rx->hdr.next = NULL; in encode_node()
542 uint8_t class = node_rx->hdr.user_meta; in process_node()
546 if (hbuf_count != -1) { in process_node()
549 /* controller to host flow control enabled */ in process_node()
557 /* for conn-related events, only pend is relevant */ in process_node()
597 hbuf_count = -1; in process_hbuf()
602 hbuf_count = hbuf_total - (hci_hbuf_sent - hci_hbuf_acked); in process_hbuf()
611 class = node_rx->hdr.user_meta; in process_hbuf()
648 hbuf_count = hbuf_total - (hci_hbuf_sent - hci_hbuf_acked); in process_hbuf()
652 class = node_rx->hdr.user_meta; in process_hbuf()
677 struct hci_driver_data *data = dev->data; in recv_thread()
700 LL_ASSERT(err == 0 || err == -EINTR); in recv_thread()
702 events[0].signal->signaled = 0U; in recv_thread()
733 if (frag->len) { in recv_thread()
735 frag->len); in recv_thread()
737 data->recv(dev, frag); in recv_thread()
754 LOG_DBG("Replying with event of %u bytes", evt->len); in cmd_handle()
759 node_rx->hdr.user_meta = hci_get_class(node_rx); in cmd_handle()
775 LOG_DBG("Replying with event of %u bytes", evt->len); in acl_handle()
791 LOG_DBG("Replying with event of %u bytes", evt->len); in iso_handle()
806 if (!buf->len) { in hci_driver_send()
808 return -EINVAL; in hci_driver_send()
828 return -EINVAL; in hci_driver_send()
842 struct hci_driver_data *data = dev->data; in hci_driver_open()
856 data->recv = recv; in hci_driver_open()
885 struct hci_driver_data *data = dev->data; in hci_driver_close()
898 data->recv = NULL; in hci_driver_close()