X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrrlc%2Frlc_tmr.c;h=2f3a1873228684b411e3b171971b4d80cf56aa1a;hb=2f98230fb83e03fcdd354a7754415155ba353f7d;hp=0c7234e649ac5afb404edec5dc09b1ff051539fe;hpb=d1f428c3527bfff3b3eae2715e91ae8449ad1784;p=o-du%2Fl2.git diff --git a/src/5gnrrlc/rlc_tmr.c b/src/5gnrrlc/rlc_tmr.c index 0c7234e64..2f3a18732 100755 --- a/src/5gnrrlc/rlc_tmr.c +++ b/src/5gnrrlc/rlc_tmr.c @@ -60,28 +60,6 @@ * @brief RLC Timer Module */ -/** - * @def RLC_TMR_CALCUATE_WAIT - * - * This macro calculates and assigns wait time based on the value of the - * timer and the timer resolution. Timer value of 0 signifies that the - * timer is not configured - * - * @param[out] _wait Time for which to arm the timer changed to proper - * value according to the resolution - * @param[in] _tmrVal Value of the timer - * @param[in] _timerRes Resolution of the timer - * -*/ -#define RLC_TMR_CALCUATE_WAIT(_wait, _tmrVal, _timerRes) \ -{ \ - (_wait) = ((_tmrVal) * SS_TICKS_SEC)/((_timerRes) * 1000); \ - if((0 != (_tmrVal)) && (0 == (_wait))) \ - { \ - (_wait) = 1; \ - } \ -} - /* private function declarations */ static Void rlcBndTmrExpiry(PTR cb); @@ -113,7 +91,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) { RlcUmUl* umUl = &(((RlcUlRbCb *)cb)->m.umUl); /* kw005.201 Changed wait calculation ccpu00117634*/ - RLC_TMR_CALCUATE_WAIT(arg.wait, umUl->reAsmblTmrInt, gCb->genCfg.timeRes); + TMR_CALCUATE_WAIT(arg.wait, umUl->reAsmblTmrInt, gCb->genCfg.timeRes); arg.timers = &umUl->reAsmblTmr; arg.max = RLC_MAX_UM_TMR; @@ -123,7 +101,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) { RlcAmUl* amUl = &(((RlcUlRbCb *)cb)->m.amUl); /* kw005.201 Changed wait calculation ccpu00117634*/ - RLC_TMR_CALCUATE_WAIT(arg.wait, amUl->reAsmblTmrInt, gCb->genCfg.timeRes); + TMR_CALCUATE_WAIT(arg.wait, amUl->reAsmblTmrInt, gCb->genCfg.timeRes); arg.timers = &amUl->reAsmblTmr; arg.max = RLC_MAX_AM_TMR; @@ -133,7 +111,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) { RlcAmUl* amUl = &(((RlcUlRbCb *)cb)->m.amUl); /* kw005.201 Changed wait calculation ccpu00117634*/ - RLC_TMR_CALCUATE_WAIT(arg.wait, + TMR_CALCUATE_WAIT(arg.wait, amUl->staProhTmrInt, gCb->genCfg.timeRes); @@ -145,7 +123,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) { RlcAmDl* amDl = &(((RlcDlRbCb *)cb)->m.amDl); /* kw005.201 Changed wait calculation ccpu00117634*/ - RLC_TMR_CALCUATE_WAIT(arg.wait, + TMR_CALCUATE_WAIT(arg.wait, amDl->pollRetxTmrInt, gCb->genCfg.timeRes); @@ -157,7 +135,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) { RlcRguSapCb* rguSap = (RlcRguSapCb *)cb; /* kw005.201 Changed wait calculation ccpu00117634*/ - RLC_TMR_CALCUATE_WAIT(arg.wait, rguSap->bndTmrInt, gCb->genCfg.timeRes); + TMR_CALCUATE_WAIT(arg.wait, rguSap->bndTmrInt, gCb->genCfg.timeRes); arg.timers = &rguSap->bndTmr; arg.max = RLC_MAX_RGUSAP_TMR; @@ -169,7 +147,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) { measEvtCb = (RlcL2MeasEvtCb *)cb; /* kw005.201 Changed wait calculation ccpu00117634*/ - RLC_TMR_CALCUATE_WAIT(arg.wait, + TMR_CALCUATE_WAIT(arg.wait, measEvtCb->l2TmrCfg.val, gCb->genCfg.timeRes); @@ -181,7 +159,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) case EVENT_RLC_UE_THROUGHPUT_TMR: { RlcThpt *thptCb = (RlcThpt *)cb; - RLC_TMR_CALCUATE_WAIT(arg.wait, ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL, gCb->genCfg.timeRes); + TMR_CALCUATE_WAIT(arg.wait, ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL, gCb->genCfg.timeRes); arg.timers = &thptCb->ueTputInfo.ueThptTmr; arg.max = RLC_MAX_THPT_TMR; break; @@ -189,7 +167,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) case EVENT_RLC_UE_DELETE_TMR: { RlcUlUeCb *ulUeCb = (RlcUlUeCb*)cb; - RLC_TMR_CALCUATE_WAIT(arg.wait, RLC_UE_DELETE_WAIT_TIME, gCb->genCfg.timeRes); + TMR_CALCUATE_WAIT(arg.wait, RLC_UE_DELETE_WAIT_TIME, gCb->genCfg.timeRes); arg.timers = &ulUeCb->ueDeleteInfo.ueDelTmr; arg.max = RLC_MAX_UE_TMR; break; @@ -197,7 +175,7 @@ void rlcStartTmr(RlcCb *gCb, PTR cb, int16_t tmrEvnt) case EVENT_RLC_SNSSAI_THROUGHPUT_TMR: { RlcThpt *thptCb = (RlcThpt *)cb; - RLC_TMR_CALCUATE_WAIT(arg.wait, ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL, gCb->genCfg.timeRes); + TMR_CALCUATE_WAIT(arg.wait, ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL, gCb->genCfg.timeRes); arg.timers = &thptCb->snssaiTputInfo.snssaiThptTmr; arg.max = RLC_MAX_THPT_TMR; break;