Merge "O1 IP PORT configuration for CM .[Issue-Id: ODUHIGH-196]"
[o-du/l2.git] / src / 5gnrsch / sch_rach.c
index d9ed2d3..079d01a 100644 (file)
@@ -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 */
@@ -152,7 +152,7 @@ uint8_t schAllocMsg3Pusch(Inst schInst, uint16_t slot, uint16_t crnti, \
    SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
    if(!schUlSlotInfo->schPuschInfo)
    {
-      DU_LOG("SCH: Memory allocation failed in schAllocMsg3Pusch");
+      DU_LOG("\nERROR  -->  SCH :  Memory allocation failed in schAllocMsg3Pusch");
       return RFAILED;
    }
    tbSize = 0;  /* since nPrb has been incremented, recalculating tbSize */
@@ -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 */
 
@@ -214,7 +214,7 @@ uint8_t schProcessRachInd(RachIndInfo *rachInd, Inst schInst)
    SCH_ALLOC(rarInfo, sizeof(RarInfo));
    if(rarInfo == NULLP)
    {
-      DU_LOG("\nMAC: Memory Allocation failed for rarInfo");
+      DU_LOG("\nERROR  -->  SCH : Memory Allocation failed for rarInfo");
       return RFAILED;
    }