X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_cfg_hdl.c;h=3fbd3554a6df7ab2da9dc8f156b0c526d523efb1;hb=ba2574ac618b40905509604da8d3a2b1b9e39664;hp=08de5389d3a8c996a6ce149aef5530e5ca82a828;hpb=4d45b914f9e94203603d3b9fdbcb1aad361301dd;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index 08de5389d..3fbd3554a 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -20,16 +20,18 @@ #include "common_def.h" #include "lrg.h" #include "lrg.x" -#include "rgu.h" -#include "rgu.x" #include "du_app_mac_inf.h" #include "mac_sch_interface.h" #include "lwr_mac_upr_inf.h" #include "mac.h" +#include "rlc_mac_inf.h" #include "mac_upr_inf_api.h" #include "lwr_mac.h" #include "lwr_mac_fsm.h" #include "mac_utils.h" +#include "lwr_mac_phy.h" + +uint8_t ssbPeriodicity[6] = {5, 10, 20, 40, 80, 160}; uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg); @@ -63,7 +65,7 @@ SchCellCfgFunc SchCellCfgOpts[] = * @return * -# ROK **/ -PUBLIC uint8_t MacSchGenCfgReq(Pst *pst, RgMngmt *cfg) +uint8_t MacSchGenCfgReq(Pst *pst, RgMngmt *cfg) { printf("\nReceived Scheduler gen config at MAC"); pst->dstInst = DEFAULT_CELLS + 1; @@ -87,7 +89,7 @@ PUBLIC uint8_t MacSchGenCfgReq(Pst *pst, RgMngmt *cfg) * @return * -# ROK **/ -PUBLIC uint8_t SchSendCfgCfm(Pst *pst, RgMngmt *cfm) +uint8_t SchSendCfgCfm(Pst *pst, RgMngmt *cfm) { printf("\nSending Scheduler config confirm to DU APP"); pst->dstEnt = ENTDUAPP; @@ -119,7 +121,7 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) { Pst cfmPst; uint16_t cellIdx; - uint16_t ret = ROK; + uint8_t ret = ROK; MacCellCb *macCellCb; memset((uint8_t *)&cfmPst, 0, sizeof(Pst)); @@ -170,9 +172,6 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg->sib1Cfg.sib1Pdu, macCellCfg->sib1Cfg.sib1PduLen); MAC_FREE_SHRABL_BUF(pst->region, pst->pool, macCellCfg ,sizeof(MacCellCfg)); } -#ifdef INTEL_WLS - LwrMacEnqueueWlsBlock(); -#endif return ret; } /* end of MacProcCellCfgReq */ @@ -194,19 +193,21 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) { SchCellCfg schCellCfg; Pst cfgPst; - uint8_t ret; + uint8_t ret =0; - memset((uint8_t *)&cfgPst, 0, sizeof(Pst)); + 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; /* fill ssb scheduler parameters */ schCellCfg.ssbSchCfg.ssbPbchPwr = macCellCfg->ssbCfg.ssbPbchPwr; schCellCfg.ssbSchCfg.scsCommon = macCellCfg->ssbCfg.scsCmn; schCellCfg.ssbSchCfg.ssbOffsetPointA = macCellCfg->ssbCfg.ssbOffsetPointA; - schCellCfg.ssbSchCfg.ssbPeriod = macCellCfg->ssbCfg.ssbPeriod; + schCellCfg.ssbSchCfg.ssbPeriod = ssbPeriodicity[macCellCfg->ssbCfg.ssbPeriod]; schCellCfg.ssbSchCfg.ssbSubcOffset = macCellCfg->ssbCfg.ssbScOffset; for(uint8_t idx=0; idxmacCellCfg.cellId; @@ -347,7 +348,11 @@ uint8_t MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm) if(schCellCfgCfm->rsp == RSP_OK) { cellId = &schCellCfgCfm->cellId; +#ifdef INTEL_TIMER_MODE + sendToLowerMac(UL_IQ_SAMPLE, 0, (void *)cellId); +#else sendToLowerMac(CONFIG_REQUEST, 0, (void *)cellId); +#endif } else {