Bluetooth: Controller: Add parameter to ISOALs sdu_write

For vendor datapaths that do not use a netbuffer to write SDUs
into, the callee of sdu_write currently has to keep track itself
of how much data has been written to the current SDU; This is wasteful
since ISOAL already keeps track of that. Add an sdu_written parameter
to the callback to inform the callee how much has been written to the
current SDU already so the callee can write using the correct offset

Signed-off-by: Troels Nilsson <trnn@demant.com>
This commit is contained in:
Troels Nilsson 2024-05-08 13:36:57 +02:00 committed by Alberto Escolar
commit 769409d41c
5 changed files with 196 additions and 8 deletions

File diff suppressed because it is too large Load diff

View file

@ -124,10 +124,11 @@ static isoal_status_t test_sink_sdu_emit(const struct isoal_sink *si
}
static isoal_status_t test_sink_sdu_write(void *dbuf,
const size_t sdu_written,
const uint8_t *pdu_payload,
const size_t consume_len)
{
memcpy(dbuf, pdu_payload, consume_len);
memcpy((uint8_t *)dbuf + sdu_written, pdu_payload, consume_len);
return ISOAL_STATUS_OK;
}