Commit 665aac0a authored by Nick Hedberg's avatar Nick Hedberg

Updates to match more fapi-compliant tx_data.request

parent c942fe43
...@@ -413,6 +413,7 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, ...@@ -413,6 +413,7 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
return 0; return 0;
} }
uint32_t offset = 0;
for (int i = 0; i < pNfapiMsg->Number_of_PDUs; i++) { for (int i = 0; i < pNfapiMsg->Number_of_PDUs; i++) {
nfapi_nr_pdu_t *value = (nfapi_nr_pdu_t *)&pNfapiMsg->pdu_list[i]; nfapi_nr_pdu_t *value = (nfapi_nr_pdu_t *)&pNfapiMsg->pdu_list[i];
// recalculate PDU_Length for Aerial (leave only the size occupied in the payload buffer afterward) // recalculate PDU_Length for Aerial (leave only the size occupied in the payload buffer afterward)
...@@ -427,13 +428,14 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf, ...@@ -427,13 +428,14 @@ static int32_t aerial_pack_tx_data_request(void *pMessageBuf,
for (; k < total_number_of_tlvs; ++k) { for (; k < total_number_of_tlvs; ++k) {
// For Aerial, the TLV tag is always 2 // For Aerial, the TLV tag is always 2
if (!(push16(/*value->TLVs[k].tag*/ 2, ppWriteBody, end) && push16(/*value->TLVs[k].length*/ 4, ppWriteBody, end))) { if (!(push16(/*value->TLVs[k].tag*/ 2, ppWriteBody, end) && push16(value->TLVs[k].length, ppWriteBody, end))) {
return 0; return 0;
} }
// value // value
if (!push32(0, ppWriteBody, end)) { if (!push32(offset, ppWriteBody, end)) {
return 0; return 0;
} }
offset += value->TLVs[k].length;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment