X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_common.c;h=83d3141cf5fb74656a8801bf59d942b583f68489;hb=653aa9a77c383713ea88d4b34759b333576646b4;hp=019718b34ea04fbb8a1bce34f4008eeb42dd9376;hpb=2a05694263fa633b9b051cb249d0e43128d5a760;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_common.c b/src/5gnrsch/sch_common.c index 019718b34..83d3141cf 100644 --- a/src/5gnrsch/sch_common.c +++ b/src/5gnrsch/sch_common.c @@ -710,7 +710,7 @@ uint16_t schAllocPucchResource(SchCellCb *cell, uint16_t crnti, uint16_t slot) * * ****************************************************************/ uint8_t schDlRsrcAllocDlMsg(DlMsgAlloc *dlMsgAlloc, SchCellCb *cell, uint16_t crnti, - uint16_t accumalatedSize, uint16_t slot) + uint32_t *accumalatedSize, uint16_t slot) { uint8_t ueIdx; uint16_t tbSize = 0; @@ -777,7 +777,9 @@ uint8_t schDlRsrcAllocDlMsg(DlMsgAlloc *dlMsgAlloc, SchCellCb *cell, uint16_t cr pdsch->codeword[cwCount].mcsIndex = ueCb.ueCfg.dlModInfo.mcsIndex; pdsch->codeword[cwCount].mcsTable = ueCb.ueCfg.dlModInfo.mcsTable; pdsch->codeword[cwCount].rvIndex = 0; - tbSize = schCalcTbSize(accumalatedSize); + tbSize = schCalcTbSize(*accumalatedSize); + if(tbSize < *accumalatedSize) + *accumalatedSize = tbSize; pdsch->codeword[cwCount].tbSize = tbSize; } pdsch->dataScramblingId = cell->cellCfg.phyCellId;