Bluetooth: controller: Fix ISO Test Mode SDU counting for framed

For framed case, the internal RX SDU counter would increment regardless
of whether the first valid SDU was received or not. According to spec,
SDU counter synchronization is done from first valid SDU.

Signed-off-by: Morten Priess <mtpr@oticon.com>
This commit is contained in:
Morten Priess 2022-09-05 13:45:54 +02:00 committed by Carles Cufí
commit a93a860231

View file

@ -742,7 +742,12 @@ static isoal_status_t ll_iso_test_sdu_emit(const struct isoal_sink *
break;
}
if (framed) {
/* In framed mode, we may start incrementing the SDU counter when rx_sdu_counter
* becomes non zero (initial state), or in case of zero-based counting, if zero
* is actually the first valid SDU counter received.
*/
if (framed && (cis->hdr.test_mode.rx_sdu_counter ||
(sdu_frag->sdu.status == ISOAL_SDU_STATUS_VALID))) {
cis->hdr.test_mode.rx_sdu_counter++;
}