Merge remote-tracking branch 'origin/Aerial_srs_unpack_fix' into integration_2025_w13 (!3295)

Fix SRS report TLV unpack

Changes the SRS unpacking to not expect padding to be present in the buffer when
working with Aerial, with which the report TLVs are not padded to the nearest
32-bit boundary. This issue was found when using a UE with 1 SRS port, which
causes the TLV to not have a length divisible by 4. Also adds a function to pull
X amount of bytes into a uint32_t, which is used to process the last 4 byte
block of the TLV, only pulling the bytes which are not padding. Completed the
SRS.indication dumping procedure to print out the report TLV. Changed the
SRS.indication unitary test to fill the last 4 byte block of the report TLV
appropriately according to the length ( which ensures the padding bytes are set
to 0 )
This commit is contained in:
Jaroslava Fiedlerova
2025-03-31 20:06:08 +02:00
7 changed files with 83 additions and 13 deletions
+2 -5
View File
@@ -309,11 +309,8 @@ uint8_t aerial_unpack_nr_srs_indication(uint8_t **ppReadPackedMsg,
nfapi_nr_srs_indication_t *srs_ind = (nfapi_nr_srs_indication_t *)msg;
for (uint8_t pdu_idx = 0; pdu_idx < srs_ind->number_of_pdus; pdu_idx++) {
nfapi_nr_srs_indication_pdu_t *pdu = &srs_ind->pdu_list[pdu_idx];
nfapi_srs_report_tlv_t *report_tlv = &pdu->report_tlv;
for (int i = 0; i < (report_tlv->length + 3) / 4; i++) {
if (!pull32(pDataMsg, &report_tlv->value[i], data_end)) {
return 0;
}
if (!unpack_nr_srs_report_tlv_value(&pdu->report_tlv, pDataMsg, data_end)) {
return 0;
}
}
return retval;