[Jira Id - ODUHIGH-400] Modified F1Setup and Gnb-Du Config Msg wrt TDD and Remove...
[o-du/l2.git] / src / 5gnrsch / sch_rach.c
index 199f6af..562ebe2 100644 (file)
@@ -109,7 +109,7 @@ bool schCheckPrachOcc(SchCellCb *cell, SlotTimingInfo prachOccasionTimingInfo)
 uint8_t schCalcPrachNumRb(SchCellCb *cell)
 {
    uint8_t tableIdx = 0;
-   uint16_t puschScs = fetchScsValue(cell->cellCfg.schInitialUlBwp.bwp.scs);
+   uint16_t puschScs = convertScsEnumValToScsVal(cell->cellCfg.schInitialUlBwp.bwp.scs);
 
    for(tableIdx=0; tableIdx < MAX_RACH_NUM_RB_IDX; tableIdx++)
    {
@@ -148,6 +148,12 @@ void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo
    uint8_t  dataType = 0;
    uint16_t freqStart = 0;
 
+   if(cell == NULLP)
+   {
+      DU_LOG("\nERROR  --> SCH : schPrachResAlloc(): Received cellCb is null");
+      return;
+   }
+
    /* If this slot is not a PRACH occassion, return */
    if(!schCheckPrachOcc(cell, prachOccasionTimingInfo))
       return;