X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_rach.c;h=5190ea874c1f05d832f4f789c352516185516fde;hb=aae1fb8fd1e149a7b3a6a6ca799c56aceadc6184;hp=010063100fd63b351d3a728cd12a4e3000942384;hpb=964fd8f1dc9c969e70caf8885332cc086ff22d74;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_rach.c b/src/5gnrmac/mac_rach.c index 010063100..5190ea874 100644 --- a/src/5gnrmac/mac_rach.c +++ b/src/5gnrmac/mac_rach.c @@ -146,8 +146,13 @@ uint8_t createMacRaCb(MacCellCb *cellCb, RachIndInfo *rachIndInfo) GET_CRNTI(crnti, ueIdx+1); /* Store in raCb */ + memset(&cellCb->macRaCb[ueIdx], 0, sizeof(MacRaCbInfo)); cellCb->macRaCb[ueIdx].cellId = rachIndInfo->cellId; cellCb->macRaCb[ueIdx].crnti = crnti; + + /* Initialize MSG4 HARQ PROC CB */ + cellCb->macRaCb[ueIdx].msg4HqInfo.procId = MAX_NUM_HARQ_PROC; + } /* Store in Rach Indication message to be sent to SCH */ @@ -493,7 +498,7 @@ uint8_t MacProcUlSchInfo(Pst *pst, UlSchedInfo *ulSchedInfo) if(ulSchedInfo != NULLP) { MacUlSlot *currUlSlot = - &macCb.macCell[cellIdx]->ulSlot[ulSchedInfo->slotIndInfo.slot % MAX_SLOTS]; + &macCb.macCell[cellIdx]->ulSlot[ulSchedInfo->slotIndInfo.slot % macCb.macCell[cellIdx]->numOfSlots]; memcpy(&currUlSlot->ulInfo, ulSchedInfo, sizeof(UlSchedInfo)); } return ROK;