Lines Matching refs:chunk
128 static void buf_chunk_index_add(struct net_buf_simple *buf, uint16_t chunk) in buf_chunk_index_add() argument
131 if (chunk < 0x80) { in buf_chunk_index_add()
132 net_buf_simple_add_u8(buf, chunk); in buf_chunk_index_add()
133 } else if (chunk < 0x8000) { in buf_chunk_index_add()
134 net_buf_simple_add_u8(buf, 0xc0 | chunk >> 6); in buf_chunk_index_add()
135 net_buf_simple_add_u8(buf, 0x80 | (chunk & BIT_MASK(6))); in buf_chunk_index_add()
137 net_buf_simple_add_u8(buf, 0xe0 | chunk >> 12); in buf_chunk_index_add()
138 net_buf_simple_add_u8(buf, 0x80 | ((chunk >> 6) & BIT_MASK(6))); in buf_chunk_index_add()
139 net_buf_simple_add_u8(buf, 0x80 | (chunk & BIT_MASK(6))); in buf_chunk_index_add()
726 struct bt_mesh_blob_chunk chunk; in handle_chunk() local
732 chunk.size = buf->len; in handle_chunk()
733 chunk.data = net_buf_simple_pull_mem(buf, chunk.size); in handle_chunk()
734 chunk.offset = idx * srv->state.xfer.chunk_size; in handle_chunk()
751 if (chunk.size != expected_size) { in handle_chunk()
752 LOG_ERR("Unexpected size: %u != %u", expected_size, chunk.size); in handle_chunk()
757 chunk.size); in handle_chunk()
769 err = srv->io->wr(srv->io, &srv->state.xfer, &srv->block, &chunk); in handle_chunk()