Merge "MAC SCH interface for RACH config"
[o-du/l2.git] / src / 5gnrsch / sch.c
index ebeb195..0ef44b8 100644 (file)
@@ -374,9 +374,9 @@ int InitSchCellCb(Inst inst, SchCellCfg *schCellCfg)
    return ROK;   
 }
 
-void fillSib1SchCfg(
+void fillSchSib1Cfg(
 Inst         schInst,
-Sib1SchCfg   *sib1SchCfg,
+SchSib1Cfg   *sib1SchCfg,
 uint8_t      pci,
 uint8_t      offsetPointA
 )
@@ -421,13 +421,13 @@ uint8_t      offsetPointA
    sib1SchCfg->n0 = slotIndex;
  
    /* calculate the PRBs */
-   freqDomResourceAlloc((offsetPointA-offset),numRbs,FreqDomainResource);
+   freqDomResourceAlloc( ((offsetPointA-offset)/6), (numRbs/6), FreqDomainResource);
 
    /* fill the PDCCH PDU */
    pdcch->sib1PdcchBwpCfg.BWPSize = MAX_NUM_RB; /* whole of BW */
    pdcch->sib1PdcchBwpCfg.BWPStart = 0;
-   pdcch->subcarrierSpacing = 0;         /* 15Khz */
-   pdcch->cyclicPrefix = 0;              /* normal */
+   pdcch->sib1PdcchBwpCfg.subcarrierSpacing = 0;         /* 15Khz */
+   pdcch->sib1PdcchBwpCfg.cyclicPrefix = 0;              /* normal */
    pdcch->sib1Coreset0Cfg.startSymbolIndex = firstSymbol;
    pdcch->sib1Coreset0Cfg.durationSymbols = numSymbols;
    memcpy(pdcch->sib1Coreset0Cfg.freqDomainResource,FreqDomainResource,6);
@@ -531,7 +531,7 @@ SchCellCfg          *schCellCfg
    memcpy(&cellCb->cellCfg, schCellCfg, sizeof(SchCellCfg));
 
    /* derive the SIB1 config parameters */
-       fillSib1SchCfg(
+       fillSchSib1Cfg(
           inst,
           &(schCellCfg->sib1SchCfg),
                schCellCfg->phyCellId,