Lines Matching full:buf

59 	struct net_buf *buf;  in bt_esp_evt_recv()  local
79 buf = bt_buf_get_evt(hdr.evt, discardable, K_NO_WAIT); in bt_esp_evt_recv()
80 if (!buf) { in bt_esp_evt_recv()
86 return buf; in bt_esp_evt_recv()
89 net_buf_add_mem(buf, &hdr, sizeof(hdr)); in bt_esp_evt_recv()
91 buf_tailroom = net_buf_tailroom(buf); in bt_esp_evt_recv()
94 net_buf_unref(buf); in bt_esp_evt_recv()
98 net_buf_add_mem(buf, data, remaining); in bt_esp_evt_recv()
100 return buf; in bt_esp_evt_recv()
106 struct net_buf *buf; in bt_esp_acl_recv() local
114 buf = bt_buf_get_rx(BT_BUF_ACL_IN, K_NO_WAIT); in bt_esp_acl_recv()
115 if (buf) { in bt_esp_acl_recv()
120 net_buf_add_mem(buf, &hdr, sizeof(hdr)); in bt_esp_acl_recv()
128 net_buf_unref(buf); in bt_esp_acl_recv()
132 buf_tailroom = net_buf_tailroom(buf); in bt_esp_acl_recv()
135 net_buf_unref(buf); in bt_esp_acl_recv()
140 net_buf_add_mem(buf, data, remaining); in bt_esp_acl_recv()
142 return buf; in bt_esp_acl_recv()
148 struct net_buf *buf; in bt_esp_iso_recv() local
156 buf = bt_buf_get_rx(BT_BUF_ISO_IN, K_NO_WAIT); in bt_esp_iso_recv()
157 if (buf) { in bt_esp_iso_recv()
162 net_buf_add_mem(buf, &hdr, sizeof(hdr)); in bt_esp_iso_recv()
170 net_buf_unref(buf); in bt_esp_iso_recv()
174 buf_tailroom = net_buf_tailroom(buf); in bt_esp_iso_recv()
177 net_buf_unref(buf); in bt_esp_iso_recv()
182 net_buf_add_mem(buf, data, remaining); in bt_esp_iso_recv()
184 return buf; in bt_esp_iso_recv()
190 struct net_buf *buf = NULL; in hci_esp_host_rcv_pkt() local
200 buf = bt_esp_evt_recv(data, remaining); in hci_esp_host_rcv_pkt()
204 buf = bt_esp_acl_recv(data, remaining); in hci_esp_host_rcv_pkt()
208 buf = bt_esp_iso_recv(data, remaining); in hci_esp_host_rcv_pkt()
216 if (buf) { in hci_esp_host_rcv_pkt()
217 LOG_DBG("Calling bt_recv(%p)", buf); in hci_esp_host_rcv_pkt()
219 bt_recv(buf); in hci_esp_host_rcv_pkt()
235 static int bt_esp32_send(struct net_buf *buf) in bt_esp32_send() argument
240 LOG_DBG("buf %p type %u len %u", buf, bt_buf_get_type(buf), buf->len); in bt_esp32_send()
242 switch (bt_buf_get_type(buf)) { in bt_esp32_send()
253 LOG_ERR("Unknown type %u", bt_buf_get_type(buf)); in bt_esp32_send()
256 net_buf_push_u8(buf, pkt_indicator); in bt_esp32_send()
258 LOG_HEXDUMP_DBG(buf->data, buf->len, "Final HCI buffer:"); in bt_esp32_send()
265 esp_vhci_host_send_packet(buf->data, buf->len); in bt_esp32_send()
272 net_buf_unref(buf); in bt_esp32_send()