/********************************************************************20**
- Name: LTE - RLC - Layer Manager file
+ Name: NR RLC - Layer Manager file
Type: C source file
File: kw_lmm.c
*********************************************************************21*/
-static const char* RLOG_MODULE_NAME="LMM";
-static int RLOG_MODULE_ID=2048;
-static int RLOG_FILE_ID=197;
/** @file kw_lmm.c
@brief RLC Layer Manager Module
**/
if(cfg->maxUe > RLC_MAX_UE)
{
#if (ERRCLASS & ERRCLS_INT_PAR)
- RLOG2(L_ERROR, "Invalid maxUe : Max [%lu] Received [%lu]",
+ DU_LOG("\nERROR --> RLC : Invalid maxUe : Max [%lu] Received [%lu]",
RLC_MAX_UE,
cfg->maxUe);
#endif /* ERRCLASS & ERRCLS_INT_PAR */
if(cfg->maxKwuSaps > RLC_MAX_KWUSAPS)
{
#if (ERRCLASS & ERRCLS_INT_PAR)
- RLOG2(L_ERROR, "Invalid maxKwuSaps : Max [%lu] Received [%lu]",
+ DU_LOG("\nERROR --> RLC : Invalid maxKwuSaps : Max [%lu] Received [%lu]",
RLC_MAX_KWUSAPS,
cfg->maxKwuSaps);
#endif /* ERRCLASS & ERRCLS_INT_PAR */
if(cfg->maxUdxSaps > RLC_MAX_UDXSAPS)
{
#if (ERRCLASS & ERRCLS_INT_PAR)
- RLOG2(L_ERROR, "Invalid maxUduSaps : Max [%lu] Received [%lu]",
+ DU_LOG("\nERROR --> RLC : Invalid maxUduSaps : Max [%lu] Received [%lu]",
RLC_MAX_UDXSAPS,
cfg->maxUdxSaps);
#endif /* ERRCLASS & ERRCLS_INT_PAR */
RLC_ALLOC(gCb,gCb->u.dlCb, sizeof (RlcDlCb));
if (gCb->u.dlCb == NULLP)
{
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return (LCM_REASON_MEM_NOAVAIL);
}
if(gCb->u.dlCb->rlcKwuDlSap == NULLP)
{
RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb));
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return (LCM_REASON_MEM_NOAVAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
{
RLC_FREE(gCb,gCb->u.dlCb->rlcKwuDlSap, rlcSapSize);
RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb));
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return (LCM_REASON_MEM_NOAVAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
RLC_FREE(gCb,gCb->u.dlCb->rlcKwuDlSap, rlcSapSize);
RLC_FREE(gCb,gCb->u.dlCb->rguDlSap, rguSapSize);
RLC_FREE(gCb,gCb->u.dlCb, sizeof (RlcDlCb));
- RLOG0(L_FATAL,"RLC DL Initialization failed");
+ DU_LOG("\nERROR --> RLC_DL : RLC DL Initialization failed");
return (LCM_REASON_MEM_NOAVAIL);
}
-#if 0
+
/* Register the timer */
-/*Pradeep: changing the SRegTmrMt() to SRegTmr()*/
- if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (uint16_t)cfg->timeRes,
+ if(ODU_REG_TMR_MT(gCb->init.ent, gCb->init.inst, (uint16_t)cfg->timeRes,
rlcActvTmr) != ROK)
{
RLC_FREE(gCb,gCb->u.dlCb->udxDlSap, rlcUdxSapSize);
return (LCM_REASON_REGTMR_FAIL);
}
-#endif
+
/* initializations for background processing of freeing memory */
rlcUtlInitToBeFreed(gCb, &(gCb->u.dlCb->toBeFreed));
rlcUtlInitializeSelfPst(gCb);
RLC_ALLOC(gCb,gCb->u.ulCb, sizeof (RlcUlCb));
if (gCb->u.ulCb == NULLP)
{
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return (LCM_REASON_MEM_NOAVAIL);
}
if(gCb->u.ulCb->rlcKwuUlSap == NULLP)
{
RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb));
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return (LCM_REASON_MEM_NOAVAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
{
RLC_FREE(gCb,gCb->u.ulCb->rlcKwuUlSap, rlcSapSize);
RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb));
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return (LCM_REASON_MEM_NOAVAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
RLC_FREE(gCb,gCb->u.ulCb->rlcKwuUlSap, rlcSapSize);
RLC_FREE(gCb,gCb->u.ulCb->rguUlSap, rlcSapSize);
RLC_FREE(gCb,gCb->u.ulCb, sizeof (RlcUlCb));
- RLOG0(L_FATAL,"RLC DL Initialization failed");
+ DU_LOG("\nERROR --> RLC_DL : RLC DL Initialization failed");
}
/* Register the timer */
-#if 0
- if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (uint16_t)cfg->timeRes,
+ if(ODU_REG_TMR_MT(gCb->init.ent, gCb->init.inst, (uint16_t)cfg->timeRes,
rlcActvTmr) != ROK)
{
RLC_FREE(gCb,gCb->u.ulCb->udxUlSap, rlcUdxSapSize);
return (LCM_REASON_REGTMR_FAIL);
}
-#endif
+
#ifdef LTE_L2_MEAS
rlcUtlL2MeasUlInit(gCb);
#endif
else
{
#if (ERRCLASS & ERRCLS_INT_PAR)
- RLOG0(L_ERROR, "Received Invalid RLC Mode");
+ DU_LOG("\nERROR --> RLC : Received Invalid RLC Mode");
#endif /* ERRCLASS & ERRCLS_INT_PAR */
return (LCM_REASON_INVALID_PAR_VAL);
break;
default:
#if (ERRCLASS & ERRCLS_INT_PAR)
- RLOG0(L_ERROR, "Received Invalid Message Type");
+ DU_LOG("\nERROR --> RLC : Received Invalid Message Type");
if(!gCb)
{
fflush(stdout);
return (RFAILED);
}
- RLOG1(L_DEBUG, "RlcMiRlcConfigReq elmId(%d)", cfg->hdr.elmId.elmnt);
+ DU_LOG("\nDEBUG --> RLC : RlcMiRlcConfigReq elmId(%d)", cfg->hdr.elmId.elmnt);
switch(cfg->hdr.elmId.elmnt)
{
rlcLmmSendCfm(tRlcCb,pst, cntrl, TCNTRL, &cntrl->hdr);
return (RFAILED);
}
- RLOG1(L_DEBUG, "RlcMiLkwCntrlReq(elmId(%d))", cntrl->hdr.elmId.elmnt);
+ DU_LOG("\nDEBUG --> RLC : RlcMiLkwCntrlReq(elmId(%d))", cntrl->hdr.elmId.elmnt);
/* In normal cases, LCM_REASON_NOT_APPL is returned in cfm.
* In all error cases appropriate reason is returned
return (RFAILED);
}
- RLOG1(L_DEBUG, "Status request for elmId(%d))", sta->hdr.elmId.elmnt);
+ DU_LOG("\nDEBUG --> RLC : Status request for elmId(%d))", sta->hdr.elmId.elmnt);
reason = LCM_REASON_NOT_APPL;
return (RFAILED);
}
- RLOG2(L_DEBUG, "RlcMiLkwStsReq(elmId(%d),action(%d))",
+ DU_LOG("\nDEBUG --> RLC : RlcMiLkwStsReq(elmId(%d),action(%d))",
action,
sts->hdr.elmId.elmnt);
#if (ERRCLASS & ERRCLS_ADD_RES) /* KW_FIX */
if(measEvt == NULLP)
{
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return RFAILED;
}
#endif
/* Check for reconfiguration */
if (rlcKwuSapCb->state != RLC_SAP_NOT_CFG)
{
- RLOG2(L_ERROR,"RLC Mode [%d] : Invalid rlckwuSap State [%d]",
+ DU_LOG("\nERROR --> RLC : RLC Mode [%d] : Invalid rlckwuSap State [%d]",
gCb->genCfg.rlcMode, rlcKwuSapCb->state);
/* reconfiguration not allowed */
return (LCM_REASON_RECONFIG_FAIL);
/* Check for reconfiguration */
if(ckwSap->state != RLC_SAP_NOT_CFG)
{
- RLOG1(L_ERROR,"Invalid rlckwuSap State [%d]",ckwSap->state);
+ DU_LOG("\nERROR --> RLC : Invalid rlckwuSap State [%d]",ckwSap->state);
return (LCM_REASON_RECONFIG_FAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
/* Check for reconfiguration */
if(udxDlSap->state != RLC_SAP_NOT_CFG)
{
- RLOG1(L_ERROR,"Invalid udxDlSap State [%d]",udxDlSap->state);
+ DU_LOG("\nERROR --> RLC : Invalid udxDlSap State [%d]",udxDlSap->state);
return (LCM_REASON_RECONFIG_FAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
/* Check for reconfiguration */
if(udxUlSap->state != RLC_SAP_NOT_CFG)
{
- RLOG1(L_ERROR,"Invalid udxUlSap State [%d]", udxUlSap->state);
+ DU_LOG("\nERROR --> RLC : Invalid udxUlSap State [%d]", udxUlSap->state);
return (LCM_REASON_RECONFIG_FAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
/* Check for reconfiguration */
if(rguSap->state != RLC_SAP_NOT_CFG)
{
- RLOG2(L_ERROR,"RLC Mode [%d]: Invalid rguSap State [%d]",
+ DU_LOG("\nERROR --> RLC : RLC Mode [%d]: Invalid rguSap State [%d]",
gCb->genCfg.rlcMode, rguSap->state);
return (LCM_REASON_RECONFIG_FAIL);
}
/* validate SAP */
if(UDX_SAP.state == RLC_SAP_NOT_CFG)
{
- RLOG0(L_ERROR,"udxUlSap not configured yet");
+ DU_LOG("\nERROR --> RLC : udxUlSap not configured yet");
return (LCM_REASON_INVALID_STATE);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
if(UDX_SAP.state != RLC_SAP_BND)
{
/* start timer to wait for bind confirm */
- rlcStartTmr(gCb,(PTR)(&UDX_SAP), RLC_EVT_WAIT_BNDCFM);
+ rlcStartTmr(gCb,(PTR)(&UDX_SAP), EVENT_RLC_WAIT_BNDCFM);
UDX_SAP.state = RLC_SAP_BINDING;
rlcUlUdxBndReq(&(UDX_SAP.pst), UDX_SAP.suId, UDX_SAP.spId);
}
/* validate SAP */
if(rguSap->state == RLC_SAP_NOT_CFG)
{
- RLOG1(L_ERROR,"RLC Mode [%d]:rguSap not configured yet", gCb->genCfg.rlcMode);
+ DU_LOG("\nERROR --> RLC : RLC Mode [%d]:rguSap not configured yet", gCb->genCfg.rlcMode);
return (LCM_REASON_INVALID_STATE);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
if(rguSap->state != RLC_SAP_BND)
{
/* start timer to wait for bind confirm */
- rlcStartTmr(gCb,(PTR)(rguSap), RLC_EVT_WAIT_BNDCFM);
+ rlcStartTmr(gCb,(PTR)(rguSap), EVENT_RLC_WAIT_BNDCFM);
rguSap->state = RLC_SAP_BINDING;
rguSap->spId = cntrl->t.cntrl.s.sapCntrl.spId;
rguSap->suId = cntrl->t.cntrl.s.sapCntrl.suId;
MsgLen tempCnt;
Pst pst;
- RLOG2(L_DEBUG, "rlcLmmSendTrc(): Trace for event=%d, gCb->trcLen=%d",
+ DU_LOG("\nDEBUG --> RLC : rlcLmmSendTrc(): Trace for event=%d, gCb->trcLen=%d",
event,
gCb->trcLen);
!= ROK)
{
/* rg005.201 removed SPutSBuf on error */
- RLOG0(L_ERROR,"SCpyMsgMsg Failed");
+ DU_LOG("\nERROR --> RLC : SCpyMsgMsg Failed");
return RFAILED;
}
/* Send Trace Indication to Layer manager */
/* Get the length of the recvd message buffer */
if (SFndLenMsg(mBuf, &bufLen) != ROK)
{
- RLOG0(L_ERROR,"SFndLenMsg Failed");
+ DU_LOG("\nERROR --> RLC : SFndLenMsg Failed");
return RFAILED;
}
/* Check if the recvd buffer size is less than request trace len */
if (SCpyMsgMsg(mBuf, pst.region, pst.pool, &dstMbuf)
!= ROK)
{
- RLOG0(L_ERROR,"SCpyMsgMsg Failed");
+ DU_LOG("\nERROR --> RLC : SCpyMsgMsg Failed");
return RFAILED;
}
{
(Void) SPutSMem(RLC_GET_MEM_REGION(gCb), RLC_GET_MEM_POOL(gCb));
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return (LCM_REASON_MEM_NOAVAIL);
}
#endif /* ERRCLASS & ERRCLS_INT_PAR */
/* Copy trcLen nos of bytes from the recvd message */
if (SCpyMsgFix(mBuf,0,gCb->trcLen,tempBuf,&tempCnt) != ROK)
{
- RLOG0(L_ERROR,"SCpyMsgFix Failed");
+ DU_LOG("\nERROR --> RLC : SCpyMsgFix Failed");
return RFAILED;
}
if (SGetMsg(pst.region, pst.pool, &dstMbuf) != ROK)
{
- RLOG0(L_FATAL,"Memory Allocation failed");
+ DU_LOG("\nERROR --> RLC : Memory Allocation failed");
return RFAILED;
}
/* Copy the tempBuf data to dst mBuf */
if (SCpyFixMsg(tempBuf,dstMbuf,0,gCb->trcLen,&tempCnt) != ROK)
{
- RLOG0(L_ERROR,"SCpyMsgFix Failed");
+ DU_LOG("\nERROR --> RLC : SCpyMsgFix Failed");
return RFAILED;
}