Lines Matching refs:remaining
69 static struct net_buf *bt_ipc_evt_recv(const uint8_t *data, size_t remaining) in bt_ipc_evt_recv() argument
76 if (remaining < sizeof(hdr)) { in bt_ipc_evt_recv()
85 remaining -= sizeof(hdr); in bt_ipc_evt_recv()
87 if (remaining != hdr.len) { in bt_ipc_evt_recv()
107 if (buf_tailroom < remaining) { in bt_ipc_evt_recv()
108 LOG_ERR("Not enough space in buffer %zu/%zu", remaining, buf_tailroom); in bt_ipc_evt_recv()
113 net_buf_add_mem(buf, data, remaining); in bt_ipc_evt_recv()
118 static struct net_buf *bt_ipc_acl_recv(const uint8_t *data, size_t remaining) in bt_ipc_acl_recv() argument
124 if (remaining < sizeof(hdr)) { in bt_ipc_acl_recv()
133 remaining -= sizeof(hdr); in bt_ipc_acl_recv()
141 if (remaining != sys_le16_to_cpu(hdr.len)) { in bt_ipc_acl_recv()
148 if (buf_tailroom < remaining) { in bt_ipc_acl_recv()
149 LOG_ERR("Not enough space in buffer %zu/%zu", remaining, buf_tailroom); in bt_ipc_acl_recv()
154 LOG_DBG("len %u", remaining); in bt_ipc_acl_recv()
155 net_buf_add_mem(buf, data, remaining); in bt_ipc_acl_recv()
160 static struct net_buf *bt_ipc_iso_recv(const uint8_t *data, size_t remaining) in bt_ipc_iso_recv() argument
167 if (remaining < sizeof(hdr)) { in bt_ipc_iso_recv()
176 remaining -= sizeof(hdr); in bt_ipc_iso_recv()
191 if (remaining != bt_iso_hdr_len(sys_le16_to_cpu(hdr.len))) { in bt_ipc_iso_recv()
198 if (buf_tailroom < remaining) { in bt_ipc_iso_recv()
199 LOG_ERR("Not enough space in buffer %zu/%zu", remaining, buf_tailroom); in bt_ipc_iso_recv()
204 LOG_DBG("len %zu", remaining); in bt_ipc_iso_recv()
205 net_buf_add_mem(buf, data, remaining); in bt_ipc_iso_recv()
215 size_t remaining = len; in bt_ipc_rx() local
220 remaining -= sizeof(pkt_indicator); in bt_ipc_rx()
224 buf = bt_ipc_evt_recv(data, remaining); in bt_ipc_rx()
228 buf = bt_ipc_acl_recv(data, remaining); in bt_ipc_rx()
232 buf = bt_ipc_iso_recv(data, remaining); in bt_ipc_rx()