X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_rach.c;h=1e4edb291f25946c090944299136aa54da0f451c;hb=7ba0c6ecc645d7b36fdd02913d1b92727c36f413;hp=7f03bfd7f3a5d0a9d8b662a855325cfcb158d603;hpb=9c929d38c3bc6ae39ed658d0a7297612e5525b00;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_rach.c b/src/5gnrsch/sch_rach.c index 7f03bfd7f..1e4edb291 100644 --- a/src/5gnrsch/sch_rach.c +++ b/src/5gnrsch/sch_rach.c @@ -118,7 +118,6 @@ uint8_t *msg3NumRb) uint8_t numPdschSymbols= 14; uint16_t tbSize = 0; - cell = schCb[schInst].cells[schInst]; // puschMu = cell->cellCfg.puschMu; delta = puschDeltaTable[puschMu]; @@ -151,6 +150,9 @@ uint8_t *msg3NumRb) DU_LOG("SCH: Memory allocation failed in schAllocMsg3Pusch"); return RFAILED; } + tbSize = 0; /* since nPrb has been incremented, recalculating tbSize */ + tbSize = schCalcTbSizeFromNPrb(numRb, mcs, numPdschSymbols); + schUlSlotInfo->schPuschInfo->harqProcId = SCH_HARQ_PROC_ID; schUlSlotInfo->schPuschInfo->resAllocType = SCH_ALLOC_TYPE_1; schUlSlotInfo->schPuschInfo->fdAlloc.startPrb = startRb; @@ -159,8 +161,8 @@ uint8_t *msg3NumRb) schUlSlotInfo->schPuschInfo->tdAlloc.numSymb = symbLen; schUlSlotInfo->schPuschInfo->tbInfo.mcs = mcs; schUlSlotInfo->schPuschInfo->tbInfo.ndi = 1; /* new transmission */ - schUlSlotInfo->schPuschInfo->tbInfo.rv = 0; - schUlSlotInfo->schPuschInfo->tbInfo.tbSize = 24; /*Considering 2 PRBs */ + schUlSlotInfo->schPuschInfo->tbInfo.rv = 0; + schUlSlotInfo->schPuschInfo->tbInfo.tbSize = tbSize; /*Considering 2 PRBs */ schUlSlotInfo->schPuschInfo->dmrsMappingType = DMRS_MAP_TYPE_A; /* Setting Type-A */ schUlSlotInfo->schPuschInfo->nrOfDmrsSymbols = NUM_DMRS_SYMBOLS; schUlSlotInfo->schPuschInfo->dmrsAddPos = DMRS_ADDITIONAL_POS;