Merge "Fixes in current code for Multi-UE support [Issue-ID: ODUHIGH-354]"
[o-du/l2.git] / src / 5gnrsch / sch_common.c
index 431c5e0..448434c 100644 (file)
@@ -205,7 +205,8 @@ void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotIndInfo pra
       {
          /* prach ocassion present in this subframe */
 #ifdef NR_TDD
-         if(UL_SLOT != schGetSlotSymbFrmt(prachOccasionTimingInfo.slot, cell->slotFrmtBitMap))
+         if(UL_SLOT != schGetSlotSymbFrmt(prachOccasionTimingInfo.slot%cell->numSlotsInPeriodicity,\
+         cell->slotFrmtBitMap))
          {
             DU_LOG("\nERROR  --> SCH : PrachCfgIdx %d doesn't support UL slot", prachCfgIdx);
          }
@@ -805,7 +806,7 @@ uint8_t schDlRsrcAllocDlMsg(DlMsgAlloc *dlMsgAlloc, SchCellCb *cell, uint16_t cr
       pdsch->codeword[cwCount].rvIndex = 0;
       tbSize = schCalcTbSize(*accumalatedSize + TX_PAYLOAD_HDR_LEN);
       if(tbSize < *accumalatedSize)
-         *accumalatedSize = tbSize;
+         *accumalatedSize = tbSize - TX_PAYLOAD_HDR_LEN;
       pdsch->codeword[cwCount].tbSize = tbSize;
    }
    pdsch->dataScramblingId = cell->cellCfg.phyCellId;