X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Frg_lmm.c;h=1f22ac36683e520b7eaa4d88430603e70943cc31;hb=f01eb5471d34834e2ef1d8dbbfc4b2fe68403650;hp=5fe6fe336c1f4773923e18c6cd0aad24cc3e851a;hpb=51c7c0d7fab79f2d07e9fb4745b9abd8fde7f263;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_lmm.c b/src/5gnrmac/rg_lmm.c index 5fe6fe336..1f22ac366 100755 --- a/src/5gnrmac/rg_lmm.c +++ b/src/5gnrmac/rg_lmm.c @@ -236,7 +236,7 @@ RgMngmt *cfg /* config structure */ - DU_LOG("\nINFO --> MAC : Received CfgReq for MAC layer, Entity = %d, Instance = %d\n", pst->srcEnt, pst->srcInst,0,0); + DU_LOG("\nINFO --> MAC : Received CfgReq for MAC layer, Entity = %d, Instance = %d", pst->srcEnt, pst->srcInst); RG_IS_INST_VALID(pst->dstInst); inst = pst->dstInst - RG_INST_START; @@ -848,6 +848,7 @@ RgCfg *cfg /* Configuaration information */ rgCb[inst].rgInit.pool = cfg->s.genCfg.mem.pool; rgCb[inst].genCfg.tmrRes = cfg->s.genCfg.tmrRes; + macCb.tmrRes = cfg->s.genCfg.tmrRes; macCb.macInst = rgCb[inst].rgInit.inst; macCb.procId = rgCb[inst].rgInit.procId; @@ -878,16 +879,15 @@ RgCfg *cfg /* Configuaration information */ } rgCb[inst].tfuSap.sapSta.sapState = LRG_NOT_CFG; /* Initialize the timer blocks */ - cmInitTimers(rgCb[inst].tmrBlk, RG_MAX_TIMER); + cmInitTimers(macCb.tmrBlk, MAX_NUM_TIMER); /* Initialzie the timer queue */ - memset(&rgCb[inst].tmrTq, 0, sizeof(CmTqType)*RG_TQ_SIZE); + memset(&macCb.tmrTq, 0, sizeof(CmTqType) * MAC_TQ_SIZE); /* Initialize the timer control point */ - memset(&rgCb[inst].tmrTqCp, 0, sizeof(CmTqCp)); - rgCb[inst].tmrTqCp.tmrLen = RG_TQ_SIZE; -#if 0 + memset(&macCb.tmrTqCp, 0, sizeof(CmTqCp)); + macCb.tmrTqCp.tmrLen = MAC_TQ_SIZE; + /* Timer Registration request to SSI */ - if (SRegTmrMt(rgCb[inst].rgInit.ent, rgCb[inst].rgInit.inst, - (S16)rgCb[inst].genCfg.tmrRes, rgActvTmr) != ROK) + if(ODU_REG_TMR_MT(ENTMAC, macCb.macInst, macCb.tmrRes, macActvTmr) != ROK) { DU_LOG("\nERROR --> MAC : Failed to register timer"); @@ -899,7 +899,7 @@ RgCfg *cfg /* Configuaration information */ return (LCM_REASON_MEM_NOAVAIL); } -#endif + /* Set Config done in TskInit */ rgCb[inst].rgInit.cfgDone = TRUE; @@ -968,7 +968,7 @@ static Void rgLMMShutdown(Inst inst) /* De-register the Timer Service */ (Void) SDeregTmrMt(rgCb[inst].rgInit.ent, rgCb[inst].rgInit.inst, - (S16)rgCb[inst].genCfg.tmrRes, rgActvTmr); + (S16)rgCb[inst].genCfg.tmrRes, macActvTmr); /* call back the task initialization function to intialize * the global RgCb Struct */ @@ -1756,31 +1756,6 @@ uint8_t status /* Status */ return (ret); } - -/** - * @brief LTE MAC timer call back function registered with SSI. - * - * @details - * - * Function : rgActvTmr - * - * This function is invoked by SSI for every timer activation - * period expiry. - * - * @return S16 - * -# ROK - **/ -S16 rgActvTmr(Ent ent,Inst inst) -{ - Inst macInst = (inst - RG_INST_START); - - /* Check if any MAC timer has expired */ - cmPrcTmr(&rgCb[macInst].tmrTqCp, rgCb[macInst].tmrTq, (PFV) rgLMMTmrExpiry); - - return ROK; - -} /* end of rgActvTmr */ - /********************************************************************** End of file