X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=inline;f=src%2F5gnrsch%2Fsch_rach.c;h=3db3816368baf79806f83d530aac4baa500d2206;hb=refs%2Fchanges%2F77%2F5377%2F4;hp=d9ed2d3995beddf069671f21fd878120f379cd5f;hpb=15c1e4f846f9935150615a5e9e7f94500bd62790;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_rach.c b/src/5gnrsch/sch_rach.c index d9ed2d399..3db381636 100644 --- a/src/5gnrsch/sch_rach.c +++ b/src/5gnrsch/sch_rach.c @@ -132,7 +132,7 @@ uint8_t schAllocMsg3Pusch(Inst schInst, uint16_t slot, uint16_t crnti, \ /* Slot allocation for msg3 based on 38.214 section 6.1.2.1 */ msg3SlotAlloc = slot + k2 + delta; - msg3SlotAlloc = msg3SlotAlloc % SCH_NUM_SLOTS; + msg3SlotAlloc = msg3SlotAlloc % cell->numSlots; startRb = cell->schUlSlotInfo[msg3SlotAlloc]->puschCurrentPrb; tbSize = schCalcTbSize(8); /* 6 bytes msg3 and 2 bytes header */ @@ -206,7 +206,7 @@ uint8_t schProcessRachInd(RachIndInfo *rachInd, Inst schInst) uint8_t ret = ROK; /* RAR will sent with a delay of RAR_DELAY */ - rarSlot = (rachInd->timingInfo.slot+RAR_DELAY+PHY_DELTA)%SCH_NUM_SLOTS; + rarSlot = (rachInd->timingInfo.slot+RAR_DELAY+PHY_DELTA)%cell->numSlots; SchDlSlotInfo *schDlSlotInfo = cell->schDlSlotInfo[rarSlot]; /* RAR will sent in the next slot */