X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_cfg_hdl.c;h=f0a50e5949daee89a8951032c8981a78016f1f91;hb=53088c437fc01fb772f221e228ba7475fb5131d5;hp=41e82c9371d1b42a902632860adb83443c130a6c;hpb=cad4905437d02b16c3916903a42f501eb8f7b1ac;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 41e82c937..f0a50e594 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -91,7 +91,7 @@ uint8_t MacSchGenCfgReq(Pst *pst, RgMngmt *cfg) **/ uint8_t SchSendCfgCfm(Pst *pst, RgMngmt *cfm) { - printf("\nSending Scheduler config confirm to DU APP"); + DU_LOG("\nDEBUG --> Sending Scheduler config confirm to DU APP"); pst->dstEnt = ENTDUAPP; pst->dstInst = 0; pst->srcInst = 0; @@ -129,7 +129,7 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) MAC_ALLOC(macCellCb, sizeof(MacCellCb)); if(macCellCb == NULLP) { - DU_LOG("\nMAC : macCellCb is NULL at handling of macCellCfg\n"); + DU_LOG("\nERROR --> MAC : macCellCb is NULL at handling of macCellCfg\n"); return RFAILED; } memset(macCellCb, 0, sizeof(MacCellCb)); @@ -143,7 +143,7 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1PduLen); if(macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1Pdu == NULLP) { - DU_LOG("\nMAC : macCellCb is NULL at handling of sib1Pdu of macCellCfg\n"); + DU_LOG("\nERROR --> MAC : macCellCb is NULL at handling of sib1Pdu of macCellCfg\n"); return RFAILED; } memcpy(macCb.macCell[cellIdx]->macCellCfg.sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1Pdu, \ @@ -193,14 +193,17 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) { SchCellCfg schCellCfg; Pst cfgPst; - uint8_t ret; + uint8_t ret =0; memset(&cfgPst, 0, sizeof(Pst)); + memset(&schCellCfg, 0, sizeof(SchCellCfg)); schCellCfg.cellId = macCellCfg->cellId; schCellCfg.phyCellId = macCellCfg->phyCellId; - schCellCfg.bandwidth = macCellCfg->dlCarrCfg.bw; schCellCfg.numerology = macCellCfg->numerology; schCellCfg.dupMode = macCellCfg->dupType; + schCellCfg.bandwidth = macCellCfg->dlCarrCfg.bw; + schCellCfg.dlFreq = macCellCfg->dlCarrCfg.freq; + schCellCfg.ulFreq = macCellCfg->ulCarrCfg.freq; /* fill ssb scheduler parameters */ schCellCfg.ssbSchCfg.ssbPbchPwr = macCellCfg->ssbCfg.ssbPbchPwr; @@ -215,7 +218,6 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) /* fill SIB1 scheduler parameters */ schCellCfg.sib1SchCfg.sib1PduLen = macCellCfg->sib1Cfg.sib1PduLen; - schCellCfg.sib1SchCfg.sib1NewTxPeriod = macCellCfg->sib1Cfg.sib1NewTxPeriod; schCellCfg.sib1SchCfg.sib1RepetitionPeriod = macCellCfg->sib1Cfg.sib1RepetitionPeriod; schCellCfg.sib1SchCfg.coresetZeroIndex = macCellCfg->sib1Cfg.coresetZeroIndex; schCellCfg.sib1SchCfg.searchSpaceZeroIndex = macCellCfg->sib1Cfg.searchSpaceZeroIndex; @@ -283,6 +285,9 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) macCellCfg->initialUlBwp.puschCommon.startSymbol; schCellCfg.schInitialUlBwp.puschCommon.lengthSymbol = macCellCfg->initialUlBwp.puschCommon.lengthSymbol; +#ifdef NR_TDD + memcpy(&schCellCfg.tddCfg, &macCellCfg->tddCfg, sizeof(TDDCfg)); +#endif FILL_PST_MAC_TO_SCH(cfgPst, EVENT_SCH_CELL_CFG);