From: Balaji Shankaran Date: Sat, 29 Feb 2020 09:16:42 +0000 (+0530) Subject: RLC-MAC Interface APIs and Memory configuration Changes X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=d10b52519198632f93deae9574adc69c7ce12efa;p=o-du%2Fl2.git RLC-MAC Interface APIs and Memory configuration Changes Change-Id: I510cae9312a6906d79eda8ed7d564ffad5fb5202 Signed-off-by: Balaji Shankaran --- diff --git a/build/odu/makefile b/build/odu/makefile index 255999e60..62ae58851 100644 --- a/build/odu/makefile +++ b/build/odu/makefile @@ -119,6 +119,7 @@ help: @echo -e "$(RULE)clean_all - cleanup everything$(NORM)" @echo -e "$(OPTS) options: $(NORM)" @echo -e "$(OPTS) MACHINE=BIT64/BIT32 - Default is BIT32$(NORM)" + @echo -e "$(OPTS) NODE=CU_STUB - Mandatory option for cu_stub$(NORM)" @echo -e "$(OPTS) MODE=TDD - If not specified, MODE=FDD$(NORM)" @echo -e "******************************************************************" @@ -128,7 +129,6 @@ prepare_dirs: $(Q)mkdir -p $(LIB_ROOT)/odu $(Q)mkdir -p $(ROOT_DIR)/libs/ $(Q)mkdir -p $(BIN_DIR)/odu - $(Q)mkdir -p $(BIN_DIR)/config $(Q)mkdir -p $(ROOT_DIR)/bin $(Q)echo -e "Directories are successfully prepared" @@ -214,9 +214,7 @@ link_cu: copy_build: link_du $(Q)cp -f ./obj/odu/odu ./bin/odu - $(Q)cp -f ../config/ssi_mem ./bin/config $(Q)cp -rf ./bin/odu $(ROOT_DIR)/bin/ - $(Q)cp -rf ./bin/config $(ROOT_DIR)/bin/ $(Q)cp -f ../scripts/odu_script.sh $(ROOT_DIR)/bin/odu $(Q)cp -f ./lib/odu/*.a $(ROOT_DIR)/libs/ $(Q)echo -e "***** BUILD COMPLETE *****" diff --git a/docs/README b/docs/README index 708c2a6af..0fb47e1c1 100644 --- a/docs/README +++ b/docs/README @@ -55,12 +55,12 @@ How to execute: cd l2/bin/cu_stub 3. Run CU Stub binary: - ./cu_stub -f ../config/ssi_mem + ./cu_stub 4. DU execution folder: cd l2/bin/odu 5. Run ODU binary: - ./odu -f ../config/ssi_mem + ./odu PS: CU stub must be run first diff --git a/src/5gnrmac/rg_ex_ms.c b/src/5gnrmac/rg_ex_ms.c index 8d1e285b4..4f96a5f35 100755 --- a/src/5gnrmac/rg_ex_ms.c +++ b/src/5gnrmac/rg_ex_ms.c @@ -222,17 +222,11 @@ Buffer *mBuf; /* message buffer */ case EVTRGUUBNDREQ: cmUnpkRguUbndReq(RgUiRguUbndReq, pst, mBuf); break; - case EVTRGUCDATREQ: - cmUnpkRguCDatReq(RgUiRguCDatReq, pst, mBuf); + case EVTRLCDLDAT: + unpackSendDlData(RgUiRguDDatReq, pst, mBuf); break; - case EVTRGUDDATREQ: - cmUnpkRguDDatReq(RgUiRguDDatReq, pst, mBuf); - break; - case EVTRGUCSTARSP: - cmUnpkRguCStaRsp(RgUiRguCStaRsp, pst, mBuf); - break; - case EVTRGUDSTARSP: - cmUnpkRguDStaRsp(RgUiRguDStaRsp, pst, mBuf); + case EVTRLCBOSTA: + unpackSendBOStatus(RgUiRguDStaRsp, pst, mBuf); break; #ifdef LTE_L2_MEAS diff --git a/src/5gnrmac/rg_ptui.c b/src/5gnrmac/rg_ptui.c index 2e5a8af68..ef72cf2dc 100755 --- a/src/5gnrmac/rg_ptui.c +++ b/src/5gnrmac/rg_ptui.c @@ -337,7 +337,7 @@ PRIVATE CONSTANT RguBndCfm RgUiRguBndCfmMt[RG_MAX_RGU_USR] = PRIVATE CONSTANT RguCDatInd RgUiRguCDatIndMt[RG_MAX_RGU_USR] = { #ifdef LCRGUIRGU - cmPkRguCDatInd, +// cmPkRguCDatInd, /* Call packRcvdUlData instead */ #else PtUiRguCDatInd, #endif @@ -347,7 +347,7 @@ PRIVATE CONSTANT RguCDatInd RgUiRguCDatIndMt[RG_MAX_RGU_USR] = PtUiRguCDatInd, #endif #ifdef LWLCRGUIRGU - cmPkRguCDatInd, +// cmPkRguCDatInd, /* Call packRcvdUlData instead */ #else PtUiRguCDatInd, #endif @@ -358,7 +358,7 @@ PRIVATE CONSTANT RguCDatInd RgUiRguCDatIndMt[RG_MAX_RGU_USR] = PRIVATE CONSTANT RguDDatInd RgUiRguDDatIndMt[RG_MAX_RGU_USR] = { #ifdef LCRGUIRGU - cmPkRguDDatInd, +// cmPkRguDDatInd, /* Call packRcvdUlData instead */ #else PtUiRguDDatInd, #endif @@ -368,7 +368,7 @@ PRIVATE CONSTANT RguDDatInd RgUiRguDDatIndMt[RG_MAX_RGU_USR] = PtUiRguDDatInd, #endif #ifdef LWLCRGUIRGU - cmPkRguDDatInd, +// cmPkRguDDatInd, /* Call packRcvdUlData instead */ #else PtUiRguDDatInd, #endif @@ -381,17 +381,17 @@ PRIVATE CONSTANT RguDDatInd RgUiRguDDatIndMt[RG_MAX_RGU_USR] = PRIVATE CONSTANT RguCStaInd RgUiRguCStaIndMt[RG_MAX_RGU_USR] = { #ifdef LCRGUIRGU - cmPkRguCStaInd, + //cmPkRguCStaInd, /* Call packSchedRep instead of cmPkRguCStaInd */ #else PtUiRguCStaInd, #endif #ifdef KW - KwLiRguCStaInd, + //RlcMacProcSchedRep, #else PtUiRguCStaInd, #endif #ifdef LWLCRGUIRGU - cmPkRguCStaInd, + //cmPkRguCStaInd, /* Call packSchedRep instead of cmPkRguCStaInd */ #else PtUiRguCStaInd, #endif @@ -404,17 +404,17 @@ PRIVATE CONSTANT RguCStaInd RgUiRguCStaIndMt[RG_MAX_RGU_USR] = PRIVATE CONSTANT RguDStaInd RgUiRguDStaIndMt[RG_MAX_RGU_USR] = { #ifdef LCRGUIRGU - cmPkRguDStaInd, + //cmPkRguDStaInd, /* Call packSchedRep instead of cmPkRguDStaInd */ #else PtUiRguDStaInd, #endif #ifdef KW - KwLiRguDStaInd, + //RlcMacProcSchedRep, #else PtUiRguDStaInd, #endif #ifdef LWLCRGUIRGU - cmPkRguDStaInd, + //cmPkRguDStaInd, /* Call packSchedRep instead of cmPkRguDStaInd */ #else PtUiRguDStaInd, #endif diff --git a/src/5gnrrlc/kw_dl_ex_ms.c b/src/5gnrrlc/kw_dl_ex_ms.c index eb12708a9..9198e4f33 100755 --- a/src/5gnrrlc/kw_dl_ex_ms.c +++ b/src/5gnrrlc/kw_dl_ex_ms.c @@ -506,16 +506,9 @@ Buffer *mBuf; /* message buffer */ ret = cmUnpkRguBndCfm(KwLiRguBndCfm, pst, mBuf ); break; } - - case EVTRGUCSTAIND: /* Coomon Channel Status Response */ - { - ret = cmUnpkRguCStaInd(KwLiRguCStaInd, pst, mBuf); - break; - } - - case EVTRGUDSTAIND: /* Dedicated Channel Status Response */ + case EVTSCHREP: /* Dedicated Channel Status Response */ { - ret = cmUnpkRguDStaInd(KwLiRguDStaInd, pst, mBuf); + ret = unpackSchedRep(RlcMacProcSchedRep, pst, mBuf); break; } /* kw005.201 added support for L2 Measurement */ diff --git a/src/5gnrrlc/kw_lim.c b/src/5gnrrlc/kw_lim.c index 7ad2d1487..298ecefb2 100755 --- a/src/5gnrrlc/kw_lim.c +++ b/src/5gnrrlc/kw_lim.c @@ -209,6 +209,106 @@ U8 status; RETVALUE(ROK); } /* KwLiRguBndCfm */ +/** + * @brief Handler to process PDU received from MAC + * + * @details + * This function receives the PDU from MAC. + * seggregates common and dedicated logical channel + * PDU and call respective handler. + * + * @param[in] pst Post structure + * @param[in] suId Service User ID + * @param[in] datInd Data Indication Information + * + * @return S16 + * -# ROK + * -# RFAILED + * +*/ + +#ifdef ANSI +PUBLIC S16 RlcMacProcUlData +( +Pst* pst, +SuId suId, +RlcMacData *ulData +) +#else +PUBLIC S16 RlcMacProcUlData(pst, suId, ulData) +Pst* pst; +SuId suId; +RlcMacData *ulData; +#endif +{ + U8 idx; + U8 lcId; /* Logical Channel */ + U8 numDLch = 0; /* Number of dedicated logical channel */ + Bool dLchPduPres; /* PDU received on dedicated logical channel */ + RguLchDatInd dLchData[RGU_MAX_LC]; /* PDU info on dedicated logical channel */ + RguDDatIndInfo dLchUlDat; /* UL data on dedicated logical channel */ + RguCDatIndInfo cLchUlDat; /* UL data on common logical channel */ + + /* Initializing dedicated logical channel Database */ + for(idx = 0; idx < RGU_MAX_LC; idx++) + { + dLchData[idx].lcId = idx; + dLchData[idx].pdu.numPdu = 0; + } + + dLchPduPres = FALSE; + + /* Seggregate PDUs received on common and dedicated channels + * and call common channel's handler */ + for(idx = 0; idx< ulData->nmbPdu; idx++) + { + if(ulData->pduInfo[idx].commCh) + { + cmMemset((U8*)&cLchUlDat, (U8)0, sizeof(RguCDatIndInfo)); + + cLchUlDat.cellId = ulData->cellId; + cLchUlDat.rnti = ulData->rnti; + cLchUlDat.lcId = ulData->pduInfo[idx].lcId; + cLchUlDat.pdu = ulData->pduInfo[idx].pduBuf; + + KwLiRguCDatInd(pst, suId, &cLchUlDat); + } + else + { + if(!dLchPduPres) + { + dLchPduPres = TRUE; + } + + lcId = ulData->pduInfo[idx].lcId; + dLchData[lcId].pdu.mBuf[dLchData[lcId].pdu.numPdu] = ulData->pduInfo[idx].pduBuf; + dLchData[lcId].pdu.numPdu++; + } + } + + /* If any PDU received on dedicated logical channel, copy into RguDDatIndInfo + * and call its handler */ + if(dLchPduPres) + { + dLchUlDat.cellId = ulData->cellId; + dLchUlDat.rnti = ulData->rnti; + + for(idx = 0; idx < RGU_MAX_LC; idx++) + { + if(dLchData[idx].pdu.numPdu) + { + cmMemcpy((U8 *)&dLchUlDat.lchData[numDLch], (U8 *)&dLchData[idx], sizeof(RguLchDatInd)); + numDLch++; + } + } + dLchUlDat.numLch = numDLch; + KwLiRguDDatInd(pst, suId, &dLchUlDat); + } + + RETVALUE(ROK); + +}/* End of RlcMacProcUlData */ + PUBLIC int rlcDDatIndRcvd; PUBLIC int rlcCDatIndRcvd; /** @@ -362,6 +462,92 @@ RguDDatIndInfo *datInd; RETVALUE(ROK); } /* KwLiRguDDatInd */ + +/******************************************************************* + * + * @brief Handler for extracting common and dedicated channel + * Scheduling result report. + * + * @details + * + * Function : RlcMacProcSchedRep + * + * Functionality: + * Handler for extracting common and dedicated channel + * Scheduling result report + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +#ifdef ANSI +PUBLIC S16 RlcMacProcSchedRep +( +Pst *pst, +SuId suId, +RlcMacSchedRep *schRep +) +#else +PUBLIC S16 RlcMacProcSchedRep(pst, suId, schRep) +Pst *pst; +SuId suId; +RlcMacSchedRep *schRep; +#endif +{ + U8 idx; /* Iterator */ + U8 nmbDLch = 0; /* Number of dedicated logical channles */ + RguCStaIndInfo cLchSchInfo; /* Common logical channel scheduling result */ + RguDStaIndInfo dLchSchInfo; /* Dedicated logical channel scheduling result */ + + for(idx=0; idx < schRep->nmbLch; idx++) + { + /* If it is common channel, fill status indication information + * and trigger the handler for each common lch separately */ + if(schRep->lchSta[idx].commCh) + { + cmMemset((U8*)&cLchSchInfo, (U8)0, sizeof(RguCStaIndInfo)); + + cLchSchInfo.cellId = schRep->cellId; + cLchSchInfo.lcId = schRep->lchSta[idx].lchStaInd.lcId; + //cLchSchInfo.transId = schRep->timeToTx; /* TODO : fill transId suing timeToTx */ + cLchSchInfo.rnti = schRep->rnti; + + KwLiRguCStaInd(pst, suId, &cLchSchInfo); + + } + else + { + /* Fill status info structure if at least one dedicated channel + * scheduling report is received */ + if(nmbDLch == 0) + { + dLchSchInfo.cellId = schRep->cellId; + dLchSchInfo.nmbOfUeGrantPerTti = 1; + dLchSchInfo.staInd[0].rnti = schRep->rnti; + //dLchSchInfo.staInd[0].transId = schRep->timeToTx; /* TODO : fill transId suing timeToTx */ + dLchSchInfo.staInd[0].nmbOfTbs = 1; + //dLchSchInfo.staInd[0].fillCrlPdu = /* TODO : Check the value needed to be filled */ + } + + /* Fill logical channel scheduling info */ + cmMemcpy((U8 *)&dLchSchInfo.staInd[0].staIndTb[0].lchStaInd[nmbDLch], (U8 *)&schRep->lchSta[idx].lchStaInd, sizeof(RguLchStaInd)); + nmbDLch++; + + } + + } + + /* Calling handler for all dedicated channels scheduling*/ + if(nmbDLch) + { + dLchSchInfo.staInd[0].staIndTb[0].nmbLch = nmbDLch; + KwLiRguDStaInd(pst, suId, &dLchSchInfo); + } + + RETVALUE(ROK); +} + /** * @brief Handler for trigerring the data transfer from RLC to MAC * for common logical channels. diff --git a/src/5gnrrlc/kw_ptli.c b/src/5gnrrlc/kw_ptli.c index dd2672908..5e7873d73 100755 --- a/src/5gnrrlc/kw_ptli.c +++ b/src/5gnrrlc/kw_ptli.c @@ -111,56 +111,6 @@ EXTERN S16 KwDlHarqStaBatchProc (Void); #endif -/********************************************************************* - * Forward Declaration of RGU Porting Functions - ********************************************************************/ -EXTERN S16 PtLiRguBndReq ARGS(( -Pst *post, -SuId suId, -SpId spId -)); - -EXTERN S16 PtLiRguUbndReq ARGS (( -Pst *post, -SpId spId, -Reason reason -)); - -EXTERN S16 PtLiRguCDatReq ARGS (( -Pst *post, -SpId spId, -RguCDatReqInfo *datReq -)); - -EXTERN S16 PtLiRguDDatReq ARGS (( -Pst *post, -SpId spId, -RguDDatReqInfo *datReq -)); - -EXTERN S16 PtLiRguCStaRsp ARGS (( -Pst *post, -SpId spId, -RguCStaRspInfo *staRsp -)); - -EXTERN S16 PtLiRguDStaRsp ARGS (( -Pst *post, -SpId spId, -RguDStaRspInfo *staRsp -)); -/* kw005.201 added support for L2 Measurement */ -#ifdef LTE_L2_MEAS -#ifdef LTE_RLC_R9 -EXTERN S16 PtLiRguL2mUlThrpMeasReq ARGS (( -Pst *post, -SpId spId, -RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq -)); -#endif /* LTE_RLC_R9 */ -#endif /* LTE_L2_MEAS */ - - /********************************************************************* * Primitives for RGU interface ********************************************************************/ @@ -171,18 +121,12 @@ PUBLIC RguBndReq kwLiRguBndReqMt[] = { #ifdef LCKWLIRGU cmPkRguBndReq, /* 0 - loosely coupled */ -#else - PtLiRguBndReq, /* 0 - loosely coupled, portable */ #endif /* LCRGUIRGU */ #ifdef RG RgUiRguBndReq, /* 1 - tightly coupled, MAC */ -#else - PtLiRguBndReq, /* 1 - tightly coupled, portable */ #endif /* RG */ #ifdef LCKWLIRGU cmPkRguBndReq, /* 0 - loosely coupled */ -#else - PtLiRguBndReq, /* 0 - loosely coupled, portable */ #endif /* LCRGUIRGU */ }; @@ -192,102 +136,43 @@ PUBLIC RguBndReq kwLiRguUbndReqMt[] = { #ifdef LCKWLIRGU cmPkRguUbndReq, /* 0 - loosely coupled */ -#else - PtLiRguUbndReq, /* 0 - loosely coupled, portable */ #endif /* LCRGUIRGU */ #ifdef RG RgUiRguUbndReq, /* 1 - tightly coupled, MAC */ -#else - PtLiRguUbndReq, /* 1 - tightly coupled, portable */ /* RG */ #endif /* RG */ #ifdef LCKWLIRGU cmPkRguUbndReq, /* 0 - loosely coupled */ -#else - PtLiRguUbndReq, /* 0 - loosely coupled, portable */ -#endif /* LCRGUIRGU */ -}; - -/* RGU Common Channel Data Request primitive */ - -PUBLIC RguCDatReq kwLiRguCDatReqMt[] = -{ -#ifdef LCKWLIRGU - cmPkRguCDatReq, /* 0 - loosely coupled */ -#else - PtLiRguCDatReq, /* 0 - loosely coupled, portable */ -#endif /* LCRGUIRGU */ -#ifdef RG - RgUiRguCDatReq, /* 1 - tightly coupled, MAC */ -#else - PtLiRguCDatReq, /* 1 - tightly coupled, portable */ -#endif /* RG */ -#ifdef LCKWLIRGU - cmPkRguCDatReq, /* 0 - loosely coupled */ -#else - PtLiRguCDatReq, /* 0 - loosely coupled, portable */ #endif /* LCRGUIRGU */ }; /* RGU Dedicated Channel Data Request primitive */ -PUBLIC RguDDatReq kwLiRguDDatReqMt[] = +PUBLIC RguDDatReq rlcMacSendDlDataOpts[] = { #ifdef LCKWLIRGU - cmPkRguDDatReq, /* 0 - loosely coupled */ -#else - PtLiRguDDatReq, /* 0 - loosely coupled, portable */ + packSendDlData, /* 0 - loosely coupled */ #endif /* LCRGUIRGU */ #ifdef RG RgUiRguDDatReq, /* 1 - tightly coupled, MAC */ -#else - PtLiRguDDatReq, /* 1 - tightly coupled, portable */ #endif /* RG */ #ifdef LCKWLIRGU - cmPkRguDDatReq, /* 0 - loosely coupled */ -#else - PtLiRguDDatReq, /* 0 - loosely coupled, portable */ + packSendDlData, /* 0 - loosely coupled */ #endif /* LCRGUIRGU */ }; -/* RGU Common Channel Status Response primitive */ -PUBLIC RguCStaRsp kwLiRguCStaRspMt[] = -{ -#ifdef LCKWLIRGU - cmPkRguCStaRsp, /* 0 - loosely coupled */ -#else - PtLiRguCStaRsp, /* 0 - loosely coupled, portable */ -#endif /* LCRGUIRGU */ -#ifdef RG - RgUiRguCStaRsp, /* 1 - tightly coupled, MAC */ -#else - PtLiRguCStaRsp, /* 1 - tightly coupled, portable */ -#endif /* RG */ -#ifdef LCKWLIRGU - cmPkRguCStaRsp, /* 0 - loosely coupled */ -#else - PtLiRguCStaRsp, /* 0 - loosely coupled, portable */ -#endif /* LCRGUIRGU */ -}; +/* RLC logical Channel Status primitive */ -/* RGU Dedicated Channel Status Response primitive */ - -PUBLIC RguDStaRsp kwLiRguDStaRspMt[] = +PUBLIC RguDStaRsp rlcMacSendBOStatusOpts[] = { #ifdef LCKWLIRGU - cmPkRguDStaRsp, /* 0 - loosely coupled */ -#else - PtLiRguDStaRsp, /* 0 - loosely coupled, portable */ + packSendBOStatus, /* 0 - loosely coupled */ #endif /* LCRGUIRGU */ #ifdef RG RgUiRguDStaRsp, /* 1 - tightly coupled, MAC */ -#else - PtLiRguDStaRsp, /* 1 - tightly coupled, portable */ #endif /* RG */ #ifdef LCKWLIRGU - cmPkRguDStaRsp, /* 0 - LWLC loosely coupled */ -#else - PtLiRguDStaRsp, /* 0 - LWLC loosely coupled, portable */ + packSendBOStatus, /* 0 - LWLC loosely coupled */ #endif /* LCRGUIRGU */ }; @@ -300,13 +185,9 @@ PUBLIC RguL2MUlThrpMeasReq kwLiRguL2MUlThrpMeasReqMt[] = { #ifdef LCKWLIRGU cmPkRguL2MUlThrpMeasReq, /* 0 - loosely coupled */ -#else - PtLiRguL2mUlThrpMeasReq, /* 0 - loosely coupled, portable */ #endif /* LCRGUIRGU */ #ifdef RG RgUiRguL2MUlThrpMeasReq, /* 1 - tightly coupled, MAC */ -#else - PtLiRguL2mUlThrpMeasReq, /* 1 - tightly coupled, portable */ #endif /* RG */ }; #endif /* LTE_RLC_R9 */ @@ -403,63 +284,6 @@ Reason reason; } /* end of KwLiRguUbndReq */ -/** - * - * @brief - * - * Handler for sending the PDU from RLC to MAC for common logical channels. - * - * @b Description: - * - * This function sends a PDU of a common logical channel to MAC - * along with timing info for BCCH and PCCH and RNTI for CCCH. - * - * @param[in] post Post structure - * @param[in] spId Service Provider ID - * @param[in] datIndInfo Data Request Information - * - * @return S16 - * -# ROK - * -# RFAILED - * - */ -#ifdef ANSI -PUBLIC S16 KwLiRguCDatReq -( -Pst *post, -SpId spId, -RguCDatReqInfo *datReq -) -#else -PUBLIC S16 KwLiRguCDatReq(post, spId, datReq) -Pst *post; -SpId spId; -RguCDatReqInfo *datReq; -#endif -{ - TRC3(KwLiRguCDatReq) -// printf("CSHP: KwLiRguCDatReq "); -#ifdef RLC_MAC_DAT_REQ_RBUF - //printf("to RING \n"); - post->event=EVTRGUCDATREQ; - if((kwLiRguDatReqRbuf(post, spId, datReq)) != ROK) - { - - SPutStaticBuffer(post->region, post->pool, - (Data *) datReq, sizeof(RguCDatReqInfo), 0); - RETVALUE(RFAILED); - } -#else - - // printf("to Pack Sel is %d \n",post->selector); - /* jump to specific primitive depending on configured selector */ - (*kwLiRguCDatReqMt[post->selector])(post, spId, datReq); -#endif - RETVALUE(ROK); - -} /* end of KwLiRguCDatReq */ - - /** * * @brief @@ -482,20 +306,20 @@ RguCDatReqInfo *datReq; * */ #ifdef ANSI -PUBLIC S16 KwLiRguDDatReq +PUBLIC S16 RlcMacSendDlData ( Pst *post, SpId spId, -RguDDatReqInfo *datReq +RlcMacData *dlData ) #else -PUBLIC S16 KwLiRguDDatReq(post, spId, datReq) +PUBLIC S16 RlcMacSendDlData(post, spId, dlData) Pst *post; SpId spId; -RguDDatReqInfo *datReq; +RlcMacData *dlData; #endif { - TRC3(KwLiRguDDatReq) + TRC3(RlcMacSendDlData) #ifdef RLC_MAC_DAT_REQ_RBUF post->event=EVTRGUDDATREQ; if((kwLiRguDatReqRbuf(post, spId, datReq)) != ROK) @@ -507,56 +331,12 @@ RguDDatReqInfo *datReq; } #else /* jump to specific primitive depending on configured selector */ - (*kwLiRguDDatReqMt[post->selector])(post, spId, datReq); + (*rlcMacSendDlDataOpts[post->selector])(post, spId, dlData); #endif RETVALUE(ROK); } /* end of KwLiRguDDatReq */ - -/** - * - * @brief - * - * Handler for reporting the Buffer Occupancy to MAC - * for common logical channels. - * - * @b Description: - * - * This function reports the Buffer Occupancy of a common logical - * channel to MAC along with timing information for BCCH and PCCH - * and RNTI for CCCH. - * - * @param[in] post Post structure - * @param[in] spId Service Provider ID - * @param[in] staRspInfo Status Response Information - * - * @return S16 - * -# ROK - * -# RFAILED - * - */ -#ifdef ANSI -PUBLIC S16 KwLiRguCStaRsp -( -Pst *post, -SpId spId, -RguCStaRspInfo *staRsp -) -#else -PUBLIC S16 KwLiRguCStaRsp(post, spId, staRsp) -Pst *post; -SpId spId; -RguCStaRspInfo *staRsp; -#endif -{ - TRC3(KwLiRguCStaRsp) - - /* jump to specific primitive depending on configured selector */ - (*kwLiRguCStaRspMt[post->selector])(post, spId, staRsp); - RETVALUE(ROK); - -} /* end of KwLiRguCStaRsp */ /** @@ -564,16 +344,16 @@ RguCStaRspInfo *staRsp; * @brief * * Handler for reporting the Buffer Occupancy to MAC - * for dedicated logical channels. + * for logical channels. * * @b Description: * * This function reports the Buffer Occupancy of one or more - * dedicated logical channels to MAC. + * logical channels to MAC. * * @param[in] post Post structure * @param[in] spId Service Provider ID - * @param[in] staRspInfo Status Response Information + * @param[in] boSta BO Status Information * * @return S16 * -# ROK @@ -581,33 +361,33 @@ RguCStaRspInfo *staRsp; * */ #ifdef ANSI -PUBLIC S16 KwLiRguDStaRsp +PUBLIC S16 RlcMacSendBOStatus ( Pst *post, SpId spId, -RguDStaRspInfo *staRsp +RlcMacBOStatus *boSta ) #else -PUBLIC S16 KwLiRguDStaRsp(post, spId, staRsp) +PUBLIC S16 RlcMacSendBOStatus(post, spId, staRsp) Pst *post; SpId spId; -RguDStaRspInfo *staRsp; +RlcMacBOStatus *boSta; #endif { - TRC3(KwLiRguDStaRsp) + TRC3(RlcMacSendBOStatus) #if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF) post->event= EVTRGUDSTARSP; if((kwLiRguStaRspRbuf(post, spId, staRsp)) != ROK) { RETVALUE(RFAILED); } -#else - /* jump to specific primitive depending on configured selector */ - (*kwLiRguDStaRspMt[post->selector])(post, spId, staRsp); #endif + /* jump to specific primitive depending on configured selector */ + (*rlcMacSendBOStatusOpts[post->selector])(post, spId, boSta); + RETVALUE(ROK); -} /* end of KwLiRguDStaRsp */ +} /* end of RlcMacSendBOStatus */ /* kw005.201 added support for L2 Measurement */ @@ -662,333 +442,6 @@ RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq; #endif /* LTE_L2_MEAS */ - -/**************************************************************************** - * Porting Functions - ***************************************************************************/ - -/** - * - * @brief - * - * PtLiRguBndReq - portable bind request - * - * @param[in] post - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] spId - Service provider ID - * - * @return S16 - * -# ROK - */ - -#ifdef ANSI -PUBLIC S16 PtLiRguBndReq -( -Pst *post, -SuId suId, -SpId spId -) -#else -PUBLIC S16 PtLiRguBndReq(post, suId, spId) -Pst *post; -SuId suId; -SpId spId; -#endif /* ANSI */ -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - - TRC3(PtLiRguBndReq) -#if (ERRCLASS & ERRCLS_DEBUG) - tKwCb = KW_GET_KWCB(post->srcInst); - RLOG0(L_ERROR,"Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - RLOG0(L_ERROR,"Improper selector value"); - UNUSED(post); - UNUSED(suId); - UNUSED(spId); - - RETVALUE(ROK); -} /* end of PtLiRguBndReq() */ - - -/** - * - * @brief - * - * PtLiRguUbndReq - portable bind request - * - * @param[in] post - Post structure - * @param[in] spId - Service user SAP ID - * @param[in] reason - Service provider ID - * - * @return S16 - * -# ROK - */ - -#ifdef ANSI -PUBLIC S16 PtLiRguUbndReq -( -Pst *post, -SpId spId, -Reason reason -) -#else -PUBLIC S16 PtLiRguUbndReq(post, spId, reason) -Pst *post; -SpId spId; -Reason reason; -#endif /* ANSI */ -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - - TRC3(PtLiRguUbndReq) -#if (ERRCLASS & ERRCLS_DEBUG) - tKwCb = KW_GET_KWCB(post->srcInst); - RLOG0(L_ERROR,"Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - UNUSED(post); - UNUSED(spId); - UNUSED(reason); - - RETVALUE(ROK); -} /* end of PtLiRguUbndReq() */ - - -/** - * - * @brief - * - * PtLiRguCDatReq - portable common channel data request - * - * @param[in] post - Post structure - * @param[in] spId - Service user SAP ID - * @param[in] datReq - Service provider ID - * - * @return S16 - * -# ROK - */ - -#ifdef ANSI -PUBLIC S16 PtLiRguCDatReq -( -Pst *post, -SpId spId, -RguCDatReqInfo *datReq -) -#else -PUBLIC S16 PtLiRguCDatReq(post, spId, datReq) -Pst *post; -SpId spId; -RguCDatReqInfo *datReq; -#endif /* ANSI */ -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - - TRC3(PtLiRguCDatReq) -#if (ERRCLASS & ERRCLS_DEBUG) - tKwCb = KW_GET_KWCB(post->srcInst); - RLOG0(L_ERROR,"Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - UNUSED(post); - UNUSED(spId); - UNUSED(datReq); - - RETVALUE(ROK); -} /* end of PtLiRguCDatReq() */ - - -/** - * - * @brief - * - * PtLiRguDDatReq - portable dedicated channel data request - * - * @param[in] post - Post structure - * @param[in] spId - Service user SAP ID - * @param[in] datReq - Service provider ID - * - * @return S16 - * -# ROK - */ - -#ifdef ANSI -PUBLIC S16 PtLiRguDDatReq -( -Pst *post, -SpId spId, -RguDDatReqInfo *datReq -) -#else -PUBLIC S16 PtLiRguDDatReq( post, spId, datReq) -Pst *post; -SpId spId; -RguDDatReqInfo *datReq; -#endif /* ANSI */ -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - - TRC3(PtLiRguDDatReq) -#if (ERRCLASS & ERRCLS_DEBUG) - tKwCb = KW_GET_KWCB(post->srcInst); - RLOG0(L_ERROR,"Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - UNUSED(post); - UNUSED(spId); - UNUSED(datReq); - - RETVALUE(ROK); -} /* end of PtLiRguDDatReq() */ - - -/** - * - * @brief - * - * PtLiRguCStaRsp - portable common channel Status Response - * - * @param[in] post - Post structure - * @param[in] spId - Service user SAP ID - * @param[in] staRsp - Service provider ID - * - * @return S16 - * -# ROK - */ - -#ifdef ANSI -PUBLIC S16 PtLiRguCStaRsp -( -Pst *post, -SpId spId, -RguCStaRspInfo *staRsp -) -#else -PUBLIC S16 PtLiRguCStaRsp(post, spId, staRsp) -Pst *post; -SpId spId; -RguCStaRspInfo *staRsp; -#endif /* ANSI */ -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - - TRC3(PtLiRguCStaRsp) -#if (ERRCLASS & ERRCLS_DEBUG) - tKwCb = KW_GET_KWCB(post->srcInst); - RLOG0(L_ERROR,"Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - UNUSED(post); - UNUSED(spId); - UNUSED(staRsp); - - RETVALUE(ROK); -} /* end of PtLiRguCStaRsp() */ - - -/** - * - * @brief - * - * PtLiRguDStaRsp - portable dedicated channel Status Response - * - * @param[in] post - Post structure - * @param[in] spId - Service user SAP ID - * @param[in] staRsp - Service provider ID - * - * @return S16 - * -# ROK - */ - -#ifdef ANSI -PUBLIC S16 PtLiRguDStaRsp -( -Pst *post, -SpId spId, -RguDStaRspInfo *staRsp -) -#else -PUBLIC S16 PtLiRguDStaRsp(post, spId, staRsp) -Pst *post; -SpId spId; -RguDStaRspInfo *staRsp; -#endif /* ANSI */ -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - - TRC3(PtLiRguDStaRsp) -#if (ERRCLASS & ERRCLS_DEBUG) - tKwCb = KW_GET_KWCB(post->srcInst); - RLOG0(L_ERROR,"Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - UNUSED(post); - UNUSED(spId); - UNUSED(staRsp); - - RETVALUE(ROK); -} /* end of PtLiRguDStaRsp() */ - -/* kw005.201 added support for L2 Measurement */ -#ifdef LTE_L2_MEAS -#ifdef LTE_RLC_R9 - -/** - * - * @brief - * - * PtLiRguL2mUlThrpMeasReq - portable L2 Measurement Ul Thoughput Measurement Request - * - * @param[in] post - Post structure - * @param[in] spId - Service user SAP ID - * @param[in] l2mUlThrpMeasReq - Ul Throughput Measurement Request - * - * @return S16 - * -# ROK - */ - -#ifdef ANSI -PUBLIC S16 PtLiRguL2mUlThrpMeasReq -( -Pst *post, -SpId spId, -RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq -) -#else -PUBLIC S16 PtLiRguL2mUlThrpMeasReq(post, spId, l2mUlThrpMeasReq) -Pst *post, -Pst *post; -SpId spId; -RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq; -#endif /* ANSI */ -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - - TRC3(PtLiRguL2mUlThrpMeasReq) -#if (ERRCLASS & ERRCLS_DEBUG) - tKwCb = KW_GET_KWCB(post->srcInst); - RLOG0(L_ERROR,"Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - UNUSED(post); - UNUSED(spId); - UNUSED(l2mUlThrpMeasReq); - - RETVALUE(ROK); -} /* end of PtLiRguL2mUlThrpMeasReq() */ - -#endif /* LTE_RLC_R9 */ -#endif /* LTE_L2_MEAS */ - #ifdef MAC_RLC_UL_RBUF PUBLIC S16 kwUlBatchProc ARGS ((Void)); EXTERN Void kwUtlFreeUlRBuf ARGS((void)); @@ -1006,7 +459,7 @@ Void; /* Read from Ring Buffer and process PDCP packets */ RguDDatIndInfo *datInd; Void *elmIndx = NULLP; - PRIVATE Pst rlcUlRbfuPst={1,1,ENTKW,0,ENTRG,0,PRIOR0,RTESPEC,EVTRGUDDATIND,0,0,0,0}; + PRIVATE Pst rlcUlRbfuPst={1,1,ENTKW,0,ENTRG,0,PRIOR0,RTESPEC,EVTRLCULDAT,0,0,0,0}; /* Read from Ring Buffer and process PDCP packets */ #ifndef SS_RBUF diff --git a/src/5gnrrlc/kw_ptui.c b/src/5gnrrlc/kw_ptui.c index 99e00b043..c056bc0ed 100755 --- a/src/5gnrrlc/kw_ptui.c +++ b/src/5gnrrlc/kw_ptui.c @@ -123,88 +123,6 @@ EXTERN S16 kwUtlDlBatchProcPkts ARGS((Void)); PUBLIC S16 kwDlBatchProcSplit ARGS((Void)); #endif -#ifdef PTKWKWU -PRIVATE S16 PtUiKwuBndCfm ARGS (( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -)); - -#endif /* PTKWKWU */ - -PUBLIC S16 PtUiKwuDatCfm ARGS (( -Pst *pst, -SuId suId, -KwuDatCfmInfo *datCfm -)); - -PUBLIC S16 PtUiKwuStaInd ARGS (( -Pst *pst, -SuId suId, -KwuStaIndInfo *staInd -)); - -PUBLIC S16 PtUiKwuReEstCmpInd ARGS (( -Pst *pst, -SuId suId, -CmLteRlcId rlcId -)); -/* kw005.201 added support for L2 Measurement */ -PUBLIC S16 PtUiKwuDiscSduCfm ARGS(( -Pst *pst, -SuId suId, -KwuDiscSduInfo *discCfm -)); -PUBLIC S16 PtUiKwuFlowCntrlInd ARGS(( -Pst *pst, -SuId suId, -KwuFlowCntrlIndInfo *flowCntrlIndInfo -)); -#ifdef LTE_L2_MEAS -PUBLIC S16 PtUiKwuDatAckInd ARGS(( -Pst *pst, -SuId suId, -KwuDatAckInfo *datAckInd -)); -#endif -#if (defined(PTKWKWU) || defined(KW_PDCP)) -PUBLIC S16 PtUiKwuDatInd ARGS (( -Pst *pst, -SuId suId, -KwuDatIndInfo *datInd, -Buffer *mBuf -)); -#endif /* PTKWKWU || KW_PDCP */ - - - -/********************************************************************* - * Forward Declartion for CKW Porting Functions - ********************************************************************/ -#ifdef PTKWCKW -PRIVATE S16 PtUiCkwBndCfm ARGS (( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -)); - -PUBLIC S16 PtUiCkwCfgCfm ARGS (( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -CkwCfgCfmInfo *cfmInfo /* Configuration Confirm */ -)); - -PUBLIC S16 PtUiCkwUeIdChgCfm ARGS(( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U32 transId, -CkwUeInfo *ueInfo, -CmStatus status -)); - -#endif /* PTKWCKW */ - - /********************************************************************* * Primitives for KWU interface @@ -216,26 +134,18 @@ PUBLIC KwuBndCfm kwUiKwuBndCfmMt[] = { #ifdef LCKWUIKWU cmPkKwuBndCfm, /* 0 - loosely coupled */ -#else - PtUiKwuBndCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ #ifdef NH NhLiKwuBndCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiKwuBndCfm, /* 1 - tightly coupled, portable */ #endif /* NH */ #ifndef KW_PDCP #ifdef PJ PjLiKwuBndCfm, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuBndCfm, /* 2 - tightly coupled, portable */ #endif /* NH */ #endif /* KW_PDCP */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuBndCfm, /* 3 - light weight loosely coupled */ -#else - PtUiKwuBndCfm, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; @@ -246,26 +156,18 @@ PUBLIC KwuDatInd kwUiKwuDatIndMt[] = { #ifdef LCKWUIKWU cmPkKwuDatInd, /* 0 - loosely coupled */ -#else - PtUiKwuDatInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ #ifdef NH NhLiKwuDatInd, /* 1 - tightly coupled, RRC */ -#else - PtUiKwuDatInd, /* 1 - tightly coupled, portable */ #endif /* NH */ #ifdef KW_PDCP #else #ifdef PJ PjLiKwuDatInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDatInd, /* 2 - tightly coupled, portable */ #endif /* NH */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDatInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuDatInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ #endif /* KW_PDCP */ @@ -276,20 +178,13 @@ PUBLIC KwuDatCfm kwUiKwuDatCfmMt[] = { #ifdef LCKWUIKWU cmPkKwuDatCfm, /* 0 - loosely coupled */ -#else - PtUiKwuDatCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuDatCfm, /* 1 - tightly coupled, portable */ #ifdef PJ PjLiKwuDatCfm, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDatCfm, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDatCfm, /* 3 - light weight loosely coupled */ -#else - PtUiKwuDatCfm, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; @@ -300,20 +195,13 @@ PUBLIC KwuStaInd kwUiKwuStaIndMt[] = { #ifdef LCKWUIKWU cmPkKwuStaInd, /* 0 - loosely coupled */ -#else - PtUiKwuStaInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuStaInd, /* 2 - tightly coupled, portable */ #ifdef PJ PjLiKwuStaInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuStaInd, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuStaInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuStaInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; @@ -322,20 +210,14 @@ PUBLIC KwuReEstCmpInd kwUiKwuReEstCmpIndMt[] = { #ifdef LCKWUIKWU cmPkKwuReEstCmpInd, /* 0 - loosely coupled */ -#else - PtUiKwuReEstCmpInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuReEstCmpInd, /* 1 - loosely coupled, portable */ #ifdef PJ PjLiKwuReEstCmpInd, /* 2 - tightly coupled, PDCP */ #else - PtUiKwuReEstCmpInd, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuReEstCmpInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuReEstCmpInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ #endif /*TENB_ACC*/ }; @@ -345,20 +227,13 @@ PUBLIC KwuDiscSduCfm kwUiKwuDiscSduCfmMt[] = { #ifdef LCKWUIKWU cmPkKwuDiscSduCfm, /* 0 - loosely coupled */ -#else - PtUiKwuDiscSduCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuDiscSduCfm, /* 1 - loosely coupled portable */ #ifdef PJ PjLiKwuDiscSduCfm, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDiscSduCfm, /* 2 - tightly coupled, PDCP */ #endif #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDiscSduCfm, /* 3 - light weight loosely coupled */ -#else - PtUiKwuDiscSduCfm, /* 3 - light weight loosely coupled, portable */ #endif /* PJ */ #endif /*TENB_ACC*/ }; @@ -366,19 +241,12 @@ PUBLIC KwuFlowCntrlInd kwUiKwuFlowCntrlIndMt[] = { #ifdef LCKWUIKWU cmPkKwuFlowCntrlInd, /* 0 - loosely coupled */ -#else - PtUiKwuFlowCntrlInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuFlowCntrlInd, /* 1 - loosely coupled portable */ #ifdef PJ PjLiKwuFlowCntrlInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuFlowCntrlInd, /* 2 - tightly coupled, portable */ #endif /* PJ */ #ifdef LCKWUIKWU cmPkKwuFlowCntrlInd, /* 3 - light weight loosely coupled */ -#else - PtUiKwuFlowCntrlInd, /* 3 - light weight loosely coupled, portable */ #endif /* LCKWUIKWU */ }; #ifdef LTE_L2_MEAS @@ -386,20 +254,13 @@ PUBLIC KwuDatAckInd kwUiKwuDatAckIndMt[] = { #ifdef LCKWUIKWU cmPkKwuDatAckInd, /* 0 - loosely coupled */ -#else - PtUiKwuDatAckInd, /* 0 - loosely coupled, portable */ #endif /* LCKWUIKWU */ - PtUiKwuDatAckInd, /* 1 - loosely coupled, portable */ #ifdef PJ PjLiKwuDatAckInd, /* 2 - tightly coupled, PDCP */ -#else - PtUiKwuDatAckInd, /* 1 - tightly coupled, portable */ #endif /* PJ */ #ifndef TENB_ACC #ifdef LWLCKWUIKWU cmPkKwuDatAckInd, /* 3 - light weight loosely coupled, portable */ -#else - PtUiKwuDatAckInd, /* 3 - light weight loosely coupled */ #endif /* PJ */ #endif /*TENB_ACC*/ }; @@ -764,414 +625,6 @@ KwuDatAckInfo *datAckInd; #endif /* LTE_L2_MEAS */ #endif /* KW_PDCP */ - -#ifdef PTKWKWU -/************************************************************************* - * KWU Porting Functions - ************************************************************************/ -/** - * - * @brief - * - * PtUiKwuBndCfm - Portable SAP bind confirm - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] status - Status - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PRIVATE S16 PtUiKwuBndCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -) -#else -PRIVATE S16 PtUiKwuBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* status */ -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuBndCfm); - - UNUSED(suId); - UNUSED(status); -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); -} /* end of PtUiKwuBndCfm */ -#endif /* PTKWKWU */ - - -/** - * - * @brief - * - * PtUiKwuDatCfm - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] datCfm - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDatCfm -( -Pst *pst, -SuId suId, -KwuDatCfmInfo *datCfm -) -#else -PUBLIC S16 PtUiKwuDatCfm(pst, suId, datCfm) -Pst *pst; -SuId suId; -KwuDatCfmInfo *datCfm; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDatCfm) - - UNUSED(pst); - UNUSED(suId); - UNUSED(datCfm); -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuDatCfm */ - - -/** - * - * @brief - * - * PtUiKwuStaInd - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] staInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuStaInd -( -Pst *pst, -SuId suId, -KwuStaIndInfo *staInd -) -#else -PUBLIC S16 PtUiKwuStaInd(pst, suId, staInd) -Pst *pst; -SuId suId; -KwuStaIndInfo *staInd; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuStaInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(staInd); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuStaInd */ - - -/** - * - * @brief - * - * PtUiKwuReEstCmpInd - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] staInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuReEstCmpInd -( -Pst *pst, -SuId suId, -CmLteRlcId rlcId -) -#else -PUBLIC S16 PtUiKwuReEstCmpInd(pst, suId, rlcId) -Pst *pst; -SuId suId; -CmLteRlcId rlcId; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuReEstCmpInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(rlcId); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuReEstCmpInd */ - -/* kw005.201 added support for L2 Measurement */ -/* - * @brief - * - * PtUiKwuDiscSduCfm - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] staInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDiscSduCfm -( -Pst *pst, -SuId suId, -KwuDiscSduInfo *discCfm -) -#else -PUBLIC S16 PtUiKwuDiscSduCfm(pst, suId, discCfm) -Pst *pst; -SuId suId; -KwuDiscSduInfo *discCfm; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDiscSduCfm) - - UNUSED(pst); - UNUSED(suId); - UNUSED(discCfm); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuDiscSduCfm */ - -/* - * @brief - * - * PtUiKwuFlowCntrlInd - Portable Flow control idication - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] flowCntrlInd - Flow control information - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuFlowCntrlInd -( -Pst *pst, -SuId suId, -KwuFlowCntrlIndInfo *flowCntrlIndInfo -) -#else -PUBLIC S16 PtUiKwuFlowCntrlInd(pst, suId, flowCntrlIndInfo) -Pst *pst; -SuId suId; -KwuFlowCntrlIndInfo *flowCntrlIndInfo; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuFlowCntrlInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(flowCntrlIndInfo); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuFlowCntrlInd */ -#ifdef LTE_L2_MEAS - -/** - * - * @brief - * - * Handler for sending the Data ack indication to the upper layer. - * - * @b Description: - * - * This function confirms the succesfull transmission of SDU - * - * @param[in] pst Post structure - * @param[in] suId Service User SAP ID - * @param[in] datAckInd DatAckInd - * - * @return S16 - * -# ROK - * -# RFAILED - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDatAckInd -( -Pst *pst, -SuId suId, -KwuDatAckInfo *datAckInd -) -#else -PUBLIC S16 PtUiKwuDatAckInd(pst, suId, datAckInd) -Pst *pst; -SuId suId; -KwuDatAckInfo *datAckInd; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDatAckInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(datAckInd); -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - RETVALUE(ROK); -}/* end of PtUiKwuDatAckInd */ -#endif /* LTE_L2_MEAS */ -#if (defined(PTKWKWU) || defined(KW_PDCP)) - -/** - * - * @brief - * - * PtUiKwuDatInd - Portable common channel data request - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] datInd - Data Request - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiKwuDatInd -( -Pst *pst, -SuId suId, -KwuDatIndInfo *datInd, -Buffer *mBuf -) -#else -PUBLIC S16 PtUiKwuDatInd(pst, suId, datInd, mBuf) -Pst *pst; -SuId suId; -KwuDatIndInfo *datInd; -Buffer *mBuf; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiKwuDatInd) - - UNUSED(pst); - UNUSED(suId); - UNUSED(datInd); - UNUSED(mBuf); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiKwuDatInd */ -#endif /* PTKWKWU || KW_PDCP */ - /********************************************************************* @@ -1184,13 +637,9 @@ PUBLIC CkwBndCfm kwUiCkwBndCfmMt[] = { #ifdef LCKWUICKW cmPkCkwBndCfm, /* 0 - loosely coupled */ -#else - PtUiCkwBndCfm, /* 0 - loosely coupled, portable */ #endif /* LCCKUICKW */ #ifdef NH NhLiCkwBndCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiCkwBndCfm, /* 1 - tightly coupled, portable */ #endif /* NH */ }; @@ -1200,13 +649,9 @@ PUBLIC CkwCfgCfm kwUiCkwCfgCfmMt[] = { #ifdef LCKWUICKW cmPkCkwCfgCfm, /* 0 - loosely coupled */ -#else - PtUiCkwCfgCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUICKW */ #ifdef NH NhLiCkwCfgCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiCkwCfgCfm, /* 1 - tightly coupled, portable */ #endif /* NH */ }; @@ -1214,13 +659,9 @@ PUBLIC CkwUeIdChgCfm kwUiCkwUeIdChgCfmMt[] = { #ifdef LCKWUICKW cmPkCkwUeIdChgCfm, /* 0 - loosely coupled */ -#else - PtUiCkwUeIdChgCfm, /* 0 - loosely coupled, portable */ #endif /* LCKWUICKW */ #ifdef NH NhLiCkwUeIdChgCfm, /* 1 - tightly coupled, RRC */ -#else - PtUiCkwUeIdChgCfm, /* 1 - tightly coupled, portable */ #endif /* NH */ }; @@ -1363,151 +804,6 @@ CmStatus status; } /* end of KwUiCkwCfgCfm */ - -#ifdef PTKWCKW -/************************************************************************* - * CKW Porting Functions - ************************************************************************/ -/** - * - * @brief - * - * KwUiCkwBndCfm - CKW SAP bind confirm - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] status - Status - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PRIVATE S16 PtUiCkwBndCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U8 status /* status */ -) -#else -PRIVATE S16 PtUiCkwBndCfm(pst, suId, status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U8 status; /* status */ -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiCkwBndCfm); - - UNUSED(pst); - UNUSED(suId); - UNUSED(status); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); -} /* end of PtUiCkwBndCfm */ - - -/** - * - * @brief - * - * PtUiCkwCfgCfm - KWU SAP bind confirm - * - * @param[in] pst - Post structure - * @param[in] suId - Service user SAP ID - * @param[in] cfmInfo - Configuration confirm - * - * @return S16 - * -# ROK - */ -#ifdef ANSI -PUBLIC S16 PtUiCkwCfgCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -CkwCfgCfmInfo *cfmInfo /* Configuration Confirm */ -) -#else -PUBLIC S16 PtUiCkwCfgCfm(pst, suId, cfmInfo) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -CkwCfgCfmInfo *cfmInfo; /* Configuration Confirm */ -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiCkwCfgCfm); - - UNUSED(pst); - UNUSED(suId); - UNUSED(cfmInfo); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiCkwCfgCfm */ - -#ifdef ANSI -PUBLIC S16 PtUiCkwUeIdChgCfm -( -Pst *pst, /* post structure */ -SuId suId, /* Service User Id */ -U32 transId, -CkwUeInfo *ueInfo, -CmStatus status -) -#else -PUBLIC S16 PtUiCkwUeIdChgCfm(pst, suId,transId,ueInfo,status) -Pst *pst; /* post structure */ -SuId suId; /* Service User Id */ -U32 transId; -CkwUeInfo *ueInfo; -CmStatus status; -#endif -{ -#if (ERRCLASS & ERRCLS_DEBUG) - KwCb *tKwCb; -#endif - TRC3(PtUiCkwUeIdChgCfm); - - UNUSED(pst); - UNUSED(suId); - UNUSED(transId); - UNUSED(ueInfo); - UNUSED(status); - -#if (ERRCLASS & ERRCLS_DEBUG) - if (pst->srcInst >= KW_MAX_RLC_INSTANCES) - { - RETVALUE(RFAILED); - } - tKwCb = KW_GET_KWCB(pst->srcInst); - RLOG0(L_ERROR, "Improper selector value"); -#endif /* (ERRCLASS & ERRCLS_DEBUG) */ - - RETVALUE(ROK); - -} /* end of PtUiCkwUeIdChgCfm */ -#endif /* PTKWCKW */ #if (defined(L2_L3_SPLIT) && defined(ICC_RECV_TSK_RBUF)) /** diff --git a/src/5gnrrlc/kw_tmm_dl.c b/src/5gnrrlc/kw_tmm_dl.c index 730f3656b..e8d5df576 100755 --- a/src/5gnrrlc/kw_tmm_dl.c +++ b/src/5gnrrlc/kw_tmm_dl.c @@ -206,7 +206,7 @@ RguCStaIndInfo *staInd; { CmLList *node; /* Current Link List Node */ KwSdu *sdu; /* SDU */ - RguCDatReqInfo *cDatReqInfo; /* Data Request Information */ + RlcMacData *dlData; S16 timeDiff = 0; Ticks curTime = 0; @@ -376,9 +376,9 @@ RguCStaIndInfo *staInd; KW_ALLOC_SHRABL_BUF(gCb->u.dlCb->rguDlSap[suId].pst.region, gCb->u.dlCb->rguDlSap[suId].pst.pool, - cDatReqInfo,(Size)sizeof(RguCDatReqInfo)); + dlData,(Size)sizeof(RlcMacData)); #if (ERRCLASS & ERRCLS_ADD_RES) - if ( cDatReqInfo == NULLP ) + if ( dlData == NULLP ) { RLOG_ARG2(L_FATAL,DBG_RBID,rbCb->rlcId.rbId, "Memory Allocation failed UEID:%d CELLID:%d", @@ -387,29 +387,15 @@ RguCStaIndInfo *staInd; RETVOID; } #endif /* ERRCLASS & ERRCLS_ADD_RES */ -#ifdef CCPU_OPT - if ( rbCb->lch.lChType == CM_LTE_LCH_BCCH || - rbCb->lch.lChType == CM_LTE_LCH_PCCH ) - { - cDatReqInfo->u.timeToTx.sfn = sdu->mode.tm.sfn; - cDatReqInfo->u.timeToTx.subframe = sdu->mode.tm.subframe; -#ifdef EMTC_ENABLE - if(rbCb->lch.lChType == CM_LTE_LCH_PCCH) - { - cDatReqInfo->pnb = sdu->mode.tm.pnb; - } -#endif - } - else - { - cDatReqInfo->u.rnti = sdu->mode.tm.rnti; - } -#endif - cDatReqInfo->pdu = sdu->mBuf; - cDatReqInfo->transId = rbCb->transId; - cDatReqInfo->cellId = rbCb->rlcId.cellId; - cDatReqInfo->lcId = rbCb->lch.lChId; - cDatReqInfo->lcType = rbCb->lch.lChType; + + dlData->timeToTx.sfn = sdu->mode.tm.sfn; + dlData->timeToTx.subframe = sdu->mode.tm.subframe; + dlData->cellId = rbCb->rlcId.cellId; + dlData->rnti = sdu->mode.tm.rnti; + dlData->nmbPdu = 1; + dlData->pduInfo[0].commCh = TRUE; + dlData->pduInfo[0].lcId = rbCb->lch.lChId; + dlData->pduInfo[0].pduBuf = sdu->mBuf; /* kw005.201 ccpu00117318, updating the statistics */ gCb->genSts.bytesSent += sdu->sduSz; @@ -427,12 +413,12 @@ RguCStaIndInfo *staInd; if(gCb->init.trc == TRUE) { /* Populate the trace params */ - kwLmmSendTrc(gCb,EVTRGUCDATREQ, NULLP); + kwLmmSendTrc(gCb,EVTRLCDLDAT, NULLP); } - KwLiRguCDatReq (&(gCb->u.dlCb->rguDlSap[suId].pst), - gCb->u.dlCb->rguDlSap[suId].spId, - cDatReqInfo); + RlcMacSendDlData(&(gCb->u.dlCb->rguDlSap[suId].pst), + gCb->u.dlCb->rguDlSap[suId].spId, + dlData); RETVOID; } @@ -509,7 +495,8 @@ MsgLen bo; KwuDatReqInfo *datReqInfo; #endif { - RguCStaRspInfo *staRspInfo; /* Status Response Information */ +// RguCStaRspInfo *staRspInfo; /* Status Response Information */ + RlcMacBOStatus *boStatus; /* Buffer occupancy status information */ KwRguSapCb *rguSap; /* SAP Information */ TRC3(kwTmmSndStaRsp) @@ -519,9 +506,9 @@ KwuDatReqInfo *datReqInfo; KW_ALLOC_SHRABL_BUF(gCb->u.dlCb->rguDlSap[rbCb->rguSapId].pst.region, gCb->u.dlCb->rguDlSap[rbCb->rguSapId].pst.pool, - staRspInfo,sizeof(RguCStaRspInfo)); + boStatus, sizeof(RguCStaRspInfo)); #if (ERRCLASS & ERRCLS_ADD_RES) - if ( staRspInfo == NULLP ) + if ( boStatus == NULLP ) { RLOG_ARG2(L_FATAL,DBG_RBID,rbCb->rlcId.rbId, "Memory Allocation failed UEID:%d CELLID:%d", @@ -530,38 +517,21 @@ KwuDatReqInfo *datReqInfo; RETVOID; } #endif /* ERRCLASS & ERRCLS_ADD_RES */ - staRspInfo->bo = bo; - staRspInfo->cellId = rbCb->rlcId.cellId; - staRspInfo->lcId = rbCb->lch.lChId; - staRspInfo->lcType = rbCb->lch.lChType; -#ifdef CCPU_OPT - if ( rbCb->lch.lChType == CM_LTE_LCH_BCCH || - rbCb->lch.lChType == CM_LTE_LCH_PCCH ) - { - staRspInfo->u.timeToTx.sfn = datReqInfo->tm.tmg.sfn; - staRspInfo->u.timeToTx.subframe = datReqInfo->tm.tmg.subframe; -#ifdef EMTC_ENABLE - if(rbCb->lch.lChType == CM_LTE_LCH_PCCH) - { - staRspInfo->emtcDiReason = datReqInfo->emtcDiReason; - staRspInfo->pnb = datReqInfo->pnb; - } -#endif - } - else if ( rbCb->lch.lChType == CM_LTE_LCH_CCCH ) - { - staRspInfo->u.rnti = datReqInfo->tm.rnti; - } -#endif + + boStatus->cellId = rbCb->rlcId.cellId; + boStatus->rnti = rbCb->rlcId.ueId; + boStatus->commCh = TRUE; + boStatus->lcId = rbCb->lch.lChId; + boStatus->bo = bo; /* If trace flag is enabled send the trace indication */ if(gCb->init.trc == TRUE) { /* Populate the trace params */ - kwLmmSendTrc(gCb,EVTRGUCSTARSP, NULLP); + kwLmmSendTrc(gCb, EVTRLCBOSTA, NULLP); } - KwLiRguCStaRsp(&rguSap->pst,rguSap->spId,staRspInfo); + RlcMacSendBOStatus(&rguSap->pst, rguSap->spId, boStatus); RETVOID; } diff --git a/src/5gnrrlc/kw_uim.c b/src/5gnrrlc/kw_uim.c index 3ec50f5b7..59a46b890 100755 --- a/src/5gnrrlc/kw_uim.c +++ b/src/5gnrrlc/kw_uim.c @@ -269,6 +269,37 @@ Reason reason; RETVALUE(ROK); } +/******************************************************************* + * + * @brief Handler for UE create request + * + * @details + * + * Function : RlcDuappProcUeCreateReq + * + * Functionality: + * Handler for UE create request + * + * @params[in] pst - Post Structure + * cfg - Configuration information for one or more RLC entities + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +PUBLIC S16 RlcDuappProcUeCreateReq(Pst *pst, CkwCfgInfo *ueCfg) +{ + U8 idx; + + ueCfg->transId = 1; + + for(idx = 0; idx < ueCfg->numEnt; idx++) + { + ueCfg->entCfg[idx].cfgType = CKW_CFG_ADD; + } + + KwUiCkwCfgReq(pst, ueCfg); +} /* RlcDuappUeCreateReq */ + /** * @brief @@ -290,13 +321,14 @@ Reason reason; PUBLIC S16 KwUiCkwCfgReq ( Pst *pst, -SpId spId, +//SpId spId, CkwCfgInfo *cfg ) #else -PUBLIC S16 KwUiCkwCfgReq(pst, spId, cfg) +//PUBLIC S16 KwUiCkwCfgReq(pst, spId, cfg) +PUBLIC S16 KwUiCkwCfgReq(pst, cfg) Pst *pst; -SpId spId; +//SpId spId; CkwCfgInfo *cfg; #endif { @@ -318,6 +350,8 @@ CkwCfgInfo *cfg; #endif tKwCb = KW_GET_KWCB(pst->dstInst); +/* HLAL */ +#if 0 RLOG1(L_DEBUG, "spId(%d)", spId); /* Validate SAP ID under ERRORCLS */ @@ -327,6 +361,7 @@ CkwCfgInfo *cfg; KW_PST_FREE(pst->region, pst->pool, cfg, sizeof(CkwCfgInfo)); RETVALUE(RFAILED); } +#endif KW_ALLOC(tKwCb, cfgTmpData, sizeof (KwUlCfgTmpData)); diff --git a/src/5gnrrlc/kw_ul_ex_ms.c b/src/5gnrrlc/kw_ul_ex_ms.c index c72ae37b6..5793ac0b4 100755 --- a/src/5gnrrlc/kw_ul_ex_ms.c +++ b/src/5gnrrlc/kw_ul_ex_ms.c @@ -256,6 +256,12 @@ Buffer *mBuf; /* message buffer */ ret = cmUnpkLkwCntrlReq(KwMiLkwCntrlReq, pst, mBuf); break; } + + case RLC_EVT_UE_CREATE_REQ: /* UE Create Request */ + { + ret = unpackUeCreateReq(RlcDuappProcUeCreateReq, pst, mBuf); + break; + } case LKW_EVT_STS_REQ: { @@ -365,12 +371,6 @@ Buffer *mBuf; /* message buffer */ break; } - case CKW_EVT_CFG_REQ: /* Configuration request */ - { - ret = cmUnpkCkwCfgReq(KwUiCkwCfgReq, pst, mBuf); - break; - } - case CKW_EVT_UEIDCHG_REQ: /* Configuration request */ { ret = cmUnpkCkwUeIdChgReq(KwUiCkwUeIdChgReq, pst, mBuf); @@ -448,15 +448,9 @@ Buffer *mBuf; /* message buffer */ break; } - case EVTRGUCDATIND: /* Coomon Channel Data request */ - { - ret = cmUnpkRguCDatInd(KwLiRguCDatInd, pst, mBuf); - break; - } - - case EVTRGUDDATIND: /* Dedicated Channel Data request */ + case EVTRLCULDAT: /* Dedicated Channel Data request */ { - ret = cmUnpkRguDDatInd(KwLiRguDDatInd, pst, mBuf); + ret = unpackRcvdUlData(RlcMacProcUlData, pst, mBuf); break; } diff --git a/src/5gnrrlc/kw_utl_dl.c b/src/5gnrrlc/kw_utl_dl.c index 351225ab8..2742a8aa6 100755 --- a/src/5gnrrlc/kw_utl_dl.c +++ b/src/5gnrrlc/kw_utl_dl.c @@ -219,6 +219,98 @@ Void PrintRLCStats(Void) } #endif +/******************************************************************* + * + * @brief + * Handler for storing all DL PDU Info into RLC-MAC interface + * struct and sending to lower interface + * + * @details + * This function stores DL PDU info for all logical channels + * of per UE grant per TTI and sends to MAC + * + * Function : KwLiRguDDatReq + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +#ifdef ANSI +PUBLIC S16 KwLiRguDDatReq +( +Pst *post, +SpId spId, +RguDDatReqInfo *datReqInfo +) +#else +PUBLIC S16 KwLiRguDDatReq(post, spId, datReqInfo) +Pst *post; +SpId spId; +RguDDatReqInfo *datReqInfo; +#endif +{ + U8 ueIdx; /* UE info list iterator */ + U8 tbIdx; /* TB info list iterator */ + U8 lchIdx; /* Lch info list iterator */ + U8 pduIdx; /* RLC PDU list iterator */ + RguDDatReqPerUe datPerUe; /* DL data info per UE */ + RguDatReqTb datPerTb; /* DL data info per TB */ + RguLchDatReq datPerLch; /* DL data info per Lch */ + RguPduInfo pduInfo; /* DL RLC PDU infor */ + RlcMacData *dlData; /* DL data to be sent to MAC */ + + TRC3(KwLiRguDDatReq) + + dlData = NULLP; + KW_ALLOC_SHRABL_BUF(post->region, post->pool, + dlData, sizeof(RlcMacData)); +#if (ERRCLASS & ERRCLS_ADD_RES) + if ( datReqInfo == NULLP ) + { + RLOG0(L_FATAL,"Memory allocation failed"); + RETVALUE(RFAILED); + } +#endif /* ERRCLASS & ERRCLS_ADD_RES */ + + for(ueIdx = 0; ueIdx < datReqInfo->nmbOfUeGrantPerTti; ueIdx++) + { + datPerUe = datReqInfo->datReq[ueIdx]; + + cmMemset((U8 *)dlData, 0, sizeof(RlcMacData)); + + dlData->cellId = datReqInfo->cellId; + dlData->rnti = datPerUe.rnti; + //dlData->timeToTx = datPerUe.transId; /* Derive timing info from transId */ + dlData->nmbPdu = 0; + + for(tbIdx = 0; tbIdx < datPerUe.nmbOfTbs; tbIdx++) + { + datPerTb = datPerUe.datReqTb[tbIdx]; + for(lchIdx = 0; lchIdx < datPerTb.nmbLch; lchIdx++) + { + datPerLch = datPerTb.lchData[lchIdx]; + for(pduIdx = 0; pduIdx < datPerLch.pdu.numPdu; pduIdx++) + { + dlData->pduInfo[dlData->nmbPdu].commCh = FALSE; + dlData->pduInfo[dlData->nmbPdu].lcId = datPerLch.lcId; + dlData->pduInfo[dlData->nmbPdu].pduBuf = datPerLch.pdu.mBuf[pduIdx]; + dlData->nmbPdu++; + }/* For per PDU */ + }/* For Data per Lch */ + }/* For Data per Tb */ + RlcMacSendDlData(post, spId, dlData); + } /* For Data per UE */ + + /* Check if to be freed here */ + /* + SPutSBuf(post->region, + post->pool, + (Data *)datReqInfo, sizeof(RguDDatReqInfo)); + */ + RETVALUE(ROK); +}/* End of KwLiRguDDatReq */ + /** * * @brief @@ -521,7 +613,7 @@ Bool staPduPrsnt; U32 staPduBo; #endif { - RguDStaRspInfo staRspInfo; /* Status Response Information */ + RlcMacBOStatus boStatus; /* Buffer occupancy status information */ KwRguSapCb *rguSap; /* MAC SAP Information */ TRC3(kwUtlSndDStaRsp) #ifndef TENB_ACC @@ -535,47 +627,23 @@ U32 staPduBo; rguSap = &(gCb->u.dlCb->rguDlSap[rbCb->rguSapId]); -#ifdef CCPU_OPT - staRspInfo.boReport.estRlcHdrSz = estHdrSz; - staRspInfo.boReport.staPduPrsnt = staPduPrsnt; -#endif -#ifdef LTE_ADV - staRspInfo.boReport.staPduBo = staPduBo; -#endif rbCb->boUnRprtdCnt = (U32)0; rbCb->lastRprtdBoToMac = (U32)bo; - staRspInfo.boReport.bo = bo; - staRspInfo.cellId = rbCb->rlcId.cellId; - staRspInfo.rnti = rbCb->rlcId.ueId; - staRspInfo.lcId = rbCb->lch.lChId; - if ( CM_LTE_MODE_UM == rbCb->mode && (rbCb->m.umDl.sduQ.count > 0)) - { - staRspInfo.boReport.oldestSduArrTime = - ((KwSdu *)(rbCb->m.umDl.sduQ.first->node))->arrTime; - } - else if ( CM_LTE_MODE_AM == rbCb->mode ) - { - if (rbCb->m.amDl.nxtRetx != NULLP) - { - staRspInfo.boReport.oldestSduArrTime = rbCb->m.amDl.nxtRetx->sduMap.sdu->arrTime; - } - else if (rbCb->m.amDl.nxtTx != NULLP) - { - staRspInfo.boReport.oldestSduArrTime = AMDL.nxtTx->arrTime; - } - else - { - kwUtlGetCurrTime(&staRspInfo.boReport.oldestSduArrTime); - } - } + + boStatus.cellId = rbCb->rlcId.cellId; + boStatus.rnti = rbCb->rlcId.ueId; + boStatus.commCh = FALSE; + boStatus.lcId = rbCb->lch.lChId; + boStatus.bo = bo; + /* If trace flag is enabled send the trace indication */ if(gCb->init.trc == TRUE) { /* Populate the trace params */ - kwLmmSendTrc(gCb,EVTRGUDSTARSP, NULLP); + kwLmmSendTrc(gCb, EVTRLCBOSTA, NULLP); } /* Send Status Response to MAC layer */ - KwLiRguDStaRsp(&rguSap->pst,rguSap->spId,&staRspInfo); + RlcMacSendBOStatus(&rguSap->pst,rguSap->spId,&boStatus); RETVALUE(ROK); diff --git a/src/cm/ckw.c b/src/cm/ckw.c index 7b92609e0..a472ef38c 100755 --- a/src/cm/ckw.c +++ b/src/cm/ckw.c @@ -507,9 +507,9 @@ Buffer *mBuf; /* * -* Fun: cmPkCkwCfgReq +* Fun: packUeCreateReq * -* Desc: pack the primitive KwUiCkwCfgReq +* Desc: pack the primitive UE Create Req * * Ret: ROK -ok * @@ -519,23 +519,21 @@ Buffer *mBuf; * */ #ifdef ANSI -PUBLIC S16 cmPkCkwCfgReq +PUBLIC S16 packUeCreateReq ( Pst *pst, -SpId spId, CkwCfgInfo *cfgInfo ) #else -PUBLIC S16 cmPkCkwCfgReq(pst, spId, cfgInfo) +PUBLIC S16 packUeCreateReq(pst, cfgInfo) Pst *pst; -SpId spId; CkwCfgInfo *cfgInfo; #endif { S16 ret1; Buffer *mBuf; mBuf = NULLP; - TRC3(cmPkCkwCfgReq) + TRC3(packUeCreateReq) if((ret1 = SGetMsg(pst->region, pst->pool, &mBuf)) != ROK) { @@ -552,6 +550,13 @@ CkwCfgInfo *cfgInfo; switch(pst->selector) { + case CKW_SEL_LWLC: + { + CMCHKPK(cmPkPtr,(PTR) cfgInfo, mBuf); + break; + } +/* HLAL */ +#if 0 #ifdef LCCKW case CKW_SEL_LC: { @@ -576,13 +581,12 @@ CkwCfgInfo *cfgInfo; break; } #endif /* LCCKW */ +#endif /* HLAL */ } - - CMCHKPKLOG(SPkS16, spId, mBuf, ECKW013, pst); - pst->event = (Event) CKW_EVT_CFG_REQ; + pst->event = (Event) RLC_EVT_UE_CREATE_REQ; RETVALUE(SPstTsk(pst,mBuf)); -} /* cmPkCkwCfgReq */ +} /* packUeCreateReq */ /* @@ -1408,9 +1412,9 @@ Buffer *mBuf; /* * -* Fun: cmUnpkCkwCfgReq +* Fun: unpackUeCreateReq * -* Desc: unpack the primitive KwUiCkwCfgReq +* Desc: unpack the primitive UE create request * * Ret: ROK -ok * @@ -1420,7 +1424,7 @@ Buffer *mBuf; * */ #ifdef ANSI -PUBLIC S16 cmUnpkCkwCfgReq +PUBLIC S16 unpackUeCreateReq ( CkwCfgReq func, Pst *pst, @@ -1434,10 +1438,9 @@ Buffer *mBuf; #endif { S16 ret1; - SpId spId = 0; CkwCfgInfo *cfgInfo = NULLP; - TRC3(cmUnpkCkwCfgReq) + TRC3(unpackUeCreateReq) if((ret1 = SGetSBuf(pst->region, pst->pool, (Data **)&cfgInfo,\ sizeof(CkwCfgInfo))) != ROK) @@ -1452,11 +1455,15 @@ Buffer *mBuf; RETVALUE(ret1); } - cmMemset((U8 *)cfgInfo, 0, sizeof(CkwCfgInfo)); - - CMCHKUNPK(SUnpkS16, &(spId), mBuf); switch(pst->selector) { + case CKW_SEL_LWLC: + { + CMCHKUNPK(cmUnpkPtr,(PTR *) &cfgInfo, mBuf); + break; + } +/* HLAL */ +#if 0 #ifdef LCCKW case CKW_SEL_LC: { @@ -1474,10 +1481,12 @@ Buffer *mBuf; break; } #endif /* LCCKW */ +#endif /* HLAL */ + } SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, cfgInfo)); + RETVALUE((*func)(pst, cfgInfo)); } /* cmUnpkCkwCfgReq */ diff --git a/src/cm/ckw.h b/src/cm/ckw.h index 5c10bc8eb..71f6f1d1d 100755 --- a/src/cm/ckw.h +++ b/src/cm/ckw.h @@ -44,6 +44,8 @@ EXTERN "C" { /* Loose Coupling define */ #define CKW_SEL_LC 0 /*!< Loose Coupling Option */ +#define CKW_SEL_TC 1 /*!< Tight Coupling Option */ +#define CKW_SEL_LWLC 2 /*!< Light Weight Loose Coupling */ /* CKW Interface defines */ #define CKW_MAX_ENT_CFG 24 /*!< Maximum number of entities to configure */ @@ -101,7 +103,7 @@ EXTERN "C" { #define CKW_EVT_BND_REQ 0x01 /*!< Bind Request */ #define CKW_EVT_BND_CFM 0x02 /*!< Bind Confirm */ #define CKW_EVT_UBND_REQ 0x03 /*!< Unbind Request */ -#define CKW_EVT_CFG_REQ 0x04 /*!< Config Request */ +#define RLC_EVT_UE_CREATE_REQ 0x04 /*!< UE Create Request */ #define CKW_EVT_CFG_CFM 0x05 /*!< Config Confirm */ #define CKW_EVT_UEIDCHG_REQ 0x06 /*!< UE Id Change Request */ #define CKW_EVT_UEIDCHG_CFM 0x07 /*!< UE Id Change Confirm */ diff --git a/src/cm/ckw.x b/src/cm/ckw.x index 08ca70d37..8502701b4 100755 --- a/src/cm/ckw.x +++ b/src/cm/ckw.x @@ -188,7 +188,8 @@ typedef struct ckwUeInfo /* Control primitives towards LTE RRC */ /* Pointer functiones for Pack/Unpack */ -typedef S16 (*CkwCfgReq) ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo)); +//typedef S16 (*CkwCfgReq) ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo)); +typedef S16 (*CkwCfgReq) ARGS((Pst *pst, CkwCfgInfo *cfgInfo)); typedef S16 (*CkwCfgCfm) ARGS((Pst *pst, SuId suId, CkwCfgCfmInfo *cfmInfo)); typedef S16 (*CkwUeIdChgReq) ARGS((Pst *pst, SpId spId, U32 transId, @@ -273,7 +274,9 @@ EXTERN S16 KwUiCkwUbndReq ARGS((Pst *pst, SpId spId, Reason reason)); * @param[in] cfgInfo - This structure contains the configuration information * @return ROK */ -EXTERN S16 KwUiCkwCfgReq ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo)); +//EXTERN S16 KwUiCkwCfgReq ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo)); +EXTERN S16 KwUiCkwCfgReq ARGS((Pst *pst, CkwCfgInfo *cfgInfo)); +EXTERN S16 RlcDuappProcUeCreateReq ARGS((Pst *pst, CkwCfgInfo *cfgInfo)); /** *@details This primitive is used by RLC to confirm the configuration requested @@ -476,9 +479,8 @@ SuId suId, U8 status )); -EXTERN S16 cmPkCkwCfgReq ARGS (( +EXTERN S16 packUeCreateReq ARGS (( Pst *pst, -SpId spId, CkwCfgInfo *cfgInfo )); @@ -576,7 +578,7 @@ Pst *pst, Buffer *mBuf )); -EXTERN S16 cmUnpkCkwCfgReq ARGS (( +EXTERN S16 unpackUeCreateReq ARGS (( CkwCfgReq func, Pst *pst, Buffer *mBuf diff --git a/src/cm/envopt.h b/src/cm/envopt.h index c1ff5da14..4c0558167 100755 --- a/src/cm/envopt.h +++ b/src/cm/envopt.h @@ -34,6 +34,8 @@ #ifndef __ENVOPTH__ #define __ENVOPTH__ #define IOT_REPETITION +#define NOCMDLINE +#define NOFILESYS /************************************************************************ kernel SCTP parameters diff --git a/src/cm/rgu.c b/src/cm/rgu.c index 7a42dbf4b..1125b6bc3 100755 --- a/src/cm/rgu.c +++ b/src/cm/rgu.c @@ -414,176 +414,13 @@ Buffer *mBuf; } -/** -* @brief Request from RLC to MAC for forwarding SDUs on common - * channel for transmission -* -* @details -* -* Function : cmPkRguCDatReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCDatReqInfo * datReq -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCDatReq -( -Pst* pst, -SpId spId, -RguCDatReqInfo * datReq -) -#else -PUBLIC S16 cmPkRguCDatReq(pst, spId, datReq) -Pst* pst; -SpId spId; -RguCDatReqInfo * datReq; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCDatReq) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU016, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguCDatReqInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) datReq, mBuf); - } - else - { - if (cmPkRguCDatReqInfo(datReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU017, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU019, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - datReq = NULLP; - } - - if (SPkS16(spId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU018, (ErrVal)0, "Packing failed"); -#endif - - if (datReq != NULLP) - { - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); - } - - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUCDATREQ; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Request from RLC to MAC for forwarding SDUs on common - * channel for transmission -* -* @details -* -* Function : cmUnpkRguCDatReq -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCDatReqInfo * datReq -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCDatReq -( -RguCDatReq func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCDatReq(func, pst, mBuf) -RguCDatReq func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SpId spId; - RguCDatReqInfo *datReq; - - TRC3(cmUnpkRguCDatReq) - - if (SUnpkS16(&spId, mBuf) != ROK) { - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, - (Data **)&datReq, sizeof(RguCDatReqInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU020, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - cmMemset((U8*)datReq, (U8)0, sizeof(RguCDatReqInfo)); - if (cmUnpkRguCDatReqInfo(datReq, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU021, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguCDatReqInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, datReq)); -} - - /** * @brief Request from RLC to MAC for forwarding SDUs on * dedicated channel for transmission * * @details * -* Function : cmPkRguDDatReq +* Function : packSendDlData * * @param[in] Pst* pst * @param[in] SpId spId @@ -592,21 +429,21 @@ Buffer *mBuf; * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmPkRguDDatReq +PUBLIC S16 packSendDlData ( Pst* pst, SpId spId, -RguDDatReqInfo * datReq +RlcMacData *dlData ) #else -PUBLIC S16 cmPkRguDDatReq(pst, spId, datReq) +PUBLIC S16 packSendDlData(pst, spId, dlData) Pst* pst; SpId spId; -RguDDatReqInfo * datReq; +RlcMacData dlData; #endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguDDatReq) + TRC3(packSendDlData) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -614,21 +451,21 @@ RguDDatReqInfo * datReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU022, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, sizeof(RguDDatReqInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)dlData, sizeof(RlcMacData)); RETVALUE(RFAILED); } if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) datReq, mBuf); + CMCHKPK(cmPkPtr,(PTR) dlData, mBuf); } else { /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS - if (cmPkRguDDatReqInfo(pst, datReq, mBuf) != ROK) + if (packRlcMacDataInfo(pst, dlData, mBuf) != ROK) #else - if (cmPkRguDDatReqInfo(datReq, mBuf) != ROK) + if (packRlcMacDataInfo(dlData, mBuf) != ROK) #endif { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -636,14 +473,14 @@ RguDDatReqInfo * datReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU023, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)datReq, - sizeof(RguDDatReqInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)dlData, + sizeof(RlcMacData)); SPutMsg(mBuf); RETVALUE(RFAILED); } if (SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguDDatReqInfo)) != ROK) { + (Data *)dlData, sizeof(RlcMacData)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -652,7 +489,7 @@ RguDDatReqInfo * datReq; SPutMsg(mBuf); RETVALUE(RFAILED); } - datReq = NULLP; + dlData = NULLP; } if (SPkS16(spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -660,15 +497,15 @@ RguDDatReqInfo * datReq; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU024, (ErrVal)0, "Packing failed"); #endif - if (datReq != NULLP); + if (dlData != NULLP); { SPutSBuf(pst->region, pst->pool, - (Data *)datReq, sizeof(RguDDatReqInfo)); + (Data *)dlData, sizeof(RlcMacData)); } SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUDDATREQ; + pst->event = (Event) EVTRLCDLDAT; RETVALUE(SPstTsk(pst,mBuf)); } @@ -679,7 +516,7 @@ RguDDatReqInfo * datReq; * * @details * -* Function : cmUnpkRguDDatReq +* Function : unpackSendDlData * * @param[in] Pst* pst * @param[in] SpId spId @@ -688,23 +525,24 @@ RguDDatReqInfo * datReq; * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDDatReq +PUBLIC S16 unpackSendDlData ( RguDDatReq func, Pst *pst, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDDatReq(func, pst, mBuf) +PUBLIC S16 unpackSendDlData(func, pst, mBuf) RguDDatReq func; Pst *pst; Buffer *mBuf; #endif { SpId spId; - RguDDatReqInfo *datReq; +// RguDDatReqInfo *datReq; + RlcMacData *dlData; - TRC3(cmUnpkRguDDatReq) + TRC3(unpackSendDlData) if (SUnpkS16(&spId, mBuf) != ROK) { SPutMsg(mBuf); @@ -713,12 +551,12 @@ Buffer *mBuf; if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datReq, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &dlData, mBuf); } else { if ((SGetSBuf(pst->region, pst->pool, - (Data **)&datReq, sizeof(RguDDatReqInfo))) != ROK) { + (Data **)&dlData, sizeof(RlcMacData))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -727,12 +565,12 @@ Buffer *mBuf; SPutMsg(mBuf); RETVALUE(RFAILED); } - cmMemset((U8*)datReq, (U8)0, sizeof(RguDDatReqInfo)); + cmMemset((U8*)dlData, (U8)0, sizeof(RlcMacData)); /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS - if (cmUnpkRguDDatReqInfo(pst,datReq, mBuf) != ROK) + if (unpackRlcMacDataInfo(pst,dlData, mBuf) != ROK) #else - if (cmUnpkRguDDatReqInfo(datReq, mBuf) != ROK) + if (unpackRlcMacDataInfo(dlData, mBuf) != ROK) #endif { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -741,174 +579,17 @@ Buffer *mBuf; (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)datReq, - sizeof(RguDDatReqInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)dlData, + sizeof(RlcMacData)); RETVALUE(RFAILED); } } SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, datReq)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for common channels -* -* @details -* -* Function : cmPkRguCDatInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCDatIndInfo * datInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCDatInd -( -Pst* pst, -SuId suId, -RguCDatIndInfo * datInd -) -#else -PUBLIC S16 cmPkRguCDatInd(pst, suId, datInd) -Pst* pst; -SuId suId; -RguCDatIndInfo * datInd; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCDatInd) - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU028, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguCDatIndInfo),0); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) datInd, mBuf); - } - else - { - if (cmPkRguCDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU029, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, - sizeof(RguCDatIndInfo),0); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, - sizeof(RguCDatIndInfo),0) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU031, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - datInd = NULLP; - } - if (SPkS16(suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU030, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguCDatIndInfo),0); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUCDATIND; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for common channels -* -* @details -* -* Function : cmUnpkRguCDatInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCDatIndInfo * datInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCDatInd -( -RguCDatInd func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCDatInd(func, pst, mBuf) -RguCDatInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - RguCDatIndInfo *datInd; + /* TODO : change function call to send RlcMacData as below: */ + RETVALUE((*func)(pst, spId, dlData)); - TRC3(cmUnpkRguCDatInd) - - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU032, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf); - } - else - { - if ((SGetStaticBuffer(pst->region, pst->pool, - (Data **)&datInd, sizeof(RguCDatIndInfo),0)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU033, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguCDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU034, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, - sizeof(RguCDatIndInfo),0); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, datInd)); + //RETVALUE((*func)(pst, spId, datReq)); } @@ -918,30 +599,30 @@ Buffer *mBuf; * * @details * -* Function : cmPkRguDDatInd +* Function : packRcvdUlData * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] RguDDatIndInfo * datInd +* @param[in] RlcMacData *ulData * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmPkRguDDatInd +PUBLIC S16 packRcvdUlData ( Pst* pst, SuId suId, -RguDDatIndInfo * datInd +RlcMacData *ulData ) #else -PUBLIC S16 cmPkRguDDatInd(pst, suId, datInd) +PUBLIC S16 packRcvdUlData(pst, suId, ulData) Pst* pst; SuId suId; -RguDDatIndInfo * datInd; +RlcMacData *ulData; #endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguDDatInd) + TRC3(packRcvdUlData) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -949,295 +630,131 @@ RguDDatIndInfo * datInd; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU035, (ErrVal)0, "Packing failed"); #endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0); + SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); RETVALUE(RFAILED); } if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) datInd, mBuf); + CMCHKPK(cmPkPtr,(PTR)ulData, mBuf); } else { - if (cmPkRguDDatIndInfo(datInd, mBuf) != ROK) { + if (packRlcMacDataInfo(ulData, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU036, (ErrVal)0, "Packing failed"); #endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0); + SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); SPutMsg(mBuf); RETVALUE(RFAILED); } if (SPutStaticBuffer(pst->region, pst->pool, - (Data *)datInd, sizeof(RguDDatIndInfo),0) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU038, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - datInd = NULLP; - } - if (SPkS16(suId, mBuf) != ROK) { + (Data *)ulData, sizeof(RlcMacData),0) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU037, (ErrVal)0, "Packing failed"); -#endif - SPutStaticBuffer(pst->region, pst->pool, (Data *)datInd, sizeof(RguDDatIndInfo),0); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - pst->event = (Event) EVTRGUDDATIND; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Data Indication from MAC to RLC to - * forward the data received for dedicated channels -* -* @details -* -* Function : cmUnpkRguDDatInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguDDatIndInfo * datInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguDDatInd -( -RguDDatInd func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguDDatInd(func, pst, mBuf) -RguDDatInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - RguDDatIndInfo *datInd; - - TRC3(cmUnpkRguDDatInd) - - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &datInd, mBuf); - } - else - { - if ((SGetStaticBuffer(pst->region, pst->pool, - (Data **)&datInd, sizeof(RguDDatIndInfo),0)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguDDatIndInfo(datInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutStaticBuffer(pst->region, pst->pool, - (Data *)datInd, sizeof(RguDDatIndInfo),0); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, datInd)); -} - - -/** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for common channels -* -* @details -* -* Function : cmPkRguCStaRsp -* -* @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCStaRspInfo * staRsp -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaRsp -( -Pst* pst, -SpId spId, -RguCStaRspInfo * staRsp -) -#else -PUBLIC S16 cmPkRguCStaRsp(pst, spId, staRsp) -Pst* pst; -SpId spId; -RguCStaRspInfo * staRsp; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCStaRsp) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU042, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguCStaRspInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) staRsp, mBuf); - } - else - { - if (cmPkRguCStaRspInfo(staRsp, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU043, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU045, (ErrVal)0, "Packing failed"); + SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, + __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, + (ErrVal)ERGU038, (ErrVal)0, "Packing failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - staRsp = NULLP; + ulData = NULLP; } - if (SPkS16(spId, mBuf) != ROK) { + if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU044, (ErrVal)0, "Packing failed"); + (ErrVal)ERGU037, (ErrVal)0, "Packing failed"); #endif - if (staRsp != NULLP) - { - SPutSBuf(pst->region, pst->pool, - (Data *)staRsp, sizeof(RguCStaRspInfo)); - } + SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0); SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUCSTARSP; + pst->event = (Event) EVTRLCULDAT; RETVALUE(SPstTsk(pst,mBuf)); } /** -* @brief Primitive invoked from RLC to MAC to - * inform the BO report for common channels +* @brief Data Indication from MAC to RLC to + * forward the data received for dedicated channels * * @details * -* Function : cmUnpkRguCStaRsp +* Function : unpackRcvdUlData * * @param[in] Pst* pst -* @param[in] SpId spId -* @param[in] RguCStaRspInfo * staRsp +* @param[in] SuId suId +* @param[in] RlcMacData *ulData * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmUnpkRguCStaRsp +PUBLIC S16 unpackRcvdUlData ( -RguCStaRsp func, +RguDDatInd func, Pst *pst, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguCStaRsp(func, pst, mBuf) -RguCStaRsp func; +PUBLIC S16 unpackRcvdUlData(func, pst, mBuf) +RguDDatInd func; Pst *pst; Buffer *mBuf; #endif { - SpId spId; - RguCStaRspInfo *staRsp; + SuId suId; + RlcMacData *ulData; - TRC3(cmUnpkRguCStaRsp) + TRC3(unpackRcvdUlData) - if (SUnpkS16(&spId, mBuf) != ROK) { + if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU046, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU039, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } + if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &ulData, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp, - sizeof(RguCStaRspInfo))) != ROK) { + if ((SGetStaticBuffer(pst->region, pst->pool, + (Data **)&ulData, sizeof(RlcMacData),0)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU047, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguCStaRspInfo(staRsp, mBuf) != ROK) { + if (unpackRlcMacDataInfo(ulData, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU048, (ErrVal)0, "UnPacking failed"); + (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, - sizeof(RguCStaRspInfo)); + SPutStaticBuffer(pst->region, pst->pool, + (Data *)ulData, sizeof(RlcMacData),0); RETVALUE(RFAILED); } } SPutMsg(mBuf); - RETVALUE((*func)(pst, spId, staRsp)); + RETVALUE((*func)(pst, suId, ulData)); } + /*rgu_c_001.main_5 - ADD - L2M & R9 Support */ #ifdef LTE_L2_MEAS @@ -1504,33 +1021,32 @@ Buffer *mBuf; * * @details * -* Function : cmPkRguDStaRsp +* Function : packSendBOStatus, * * @param[in] Pst* pst * @param[in] SpId spId -* @param[in] RguDStaRspInfo * staRsp +* @param[in] RlcMacBOStatus * staRsp * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmPkRguDStaRsp +PUBLIC S16 packSendBOStatus ( Pst* pst, SpId spId, -RguDStaRspInfo *staRsp +RlcMacBOStatus *boStatus ) #else -PUBLIC S16 cmPkRguDStaRsp(pst, spId, staRsp) +PUBLIC S16 packSendBOStatus(pst, spId, staRsp) Pst* pst; SpId spId; -RguDStaRspInfo *staRsp; +RlcMacBOStatus *boStatus; #endif { - - RguDStaRspInfo *staRspInfo = NULL; + RlcMacBOStatus *boStaInfo = NULL; Buffer *mBuf = NULLP; - if(SGetSBuf(pst->region, pst->pool, (Data **)&staRspInfo, sizeof(RguDStaRspInfo)) != ROK) + if(SGetSBuf(pst->region, pst->pool, (Data **)&boStaInfo, sizeof(RlcMacBOStatus)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, @@ -1540,30 +1056,30 @@ RguDStaRspInfo *staRsp; RETVALUE(RFAILED); } #ifdef ERRCLS_KW - /* staRspInfo cant be NULL here */ - if (staRspInfo == NULLP) + /* boStaInfo cant be NULL here */ + if (boStaInfo == NULLP) { RETVALUE(RFAILED); } #endif - cmMemcpy((U8 *)staRspInfo, (U8 *)staRsp, sizeof(RguDStaRspInfo)); + cmMemcpy((U8 *)boStaInfo, (U8 *)boStatus, sizeof(RlcMacBOStatus)); if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU056, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus)); RETVALUE(RFAILED); } if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) staRspInfo, mBuf); + CMCHKPK(cmPkPtr,(PTR) boStaInfo, mBuf); } else { - if (cmPkRguDStaRspInfo(staRsp, mBuf) != ROK) { + if (packBOStatusInfo(boStatus, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -1579,15 +1095,15 @@ RguDStaRspInfo *staRsp; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU058, (ErrVal)0, "Packing failed"); #endif - if (staRspInfo != NULLP) + if (boStaInfo != NULLP) { - SPutSBuf(pst->region, pst->pool, (Data *)staRspInfo, sizeof(RguDStaRspInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus)); } SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUDSTARSP; + pst->event = (Event)EVTRLCBOSTA; RETVALUE(SPstTsk(pst,mBuf)); SPutMsg(mBuf); } @@ -1595,36 +1111,36 @@ RguDStaRspInfo *staRsp; /** * @brief Primitive invoked from RLC to MAC to - * inform the BO report for dedicated channels +* inform the BO report for dedicated channels * * @details * -* Function : cmUnpkRguDStaRsp +* Function : unpackSendBOStatus * * @param[in] Pst* pst * @param[in] SpId spId -* @param[in] RguDStaRspInfo * staRsp +* @param[in] RlcMacBOStatus * staRsp * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDStaRsp +PUBLIC S16 unpackSendBOStatus ( RguDStaRsp func, Pst *pst, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDStaRsp(func, pst, mBuf) +PUBLIC S16 unpackSendBOStatus(func, pst, mBuf) RguDStaRsp func; Pst *pst; Buffer *mBuf; #endif { SpId spId; - RguDStaRspInfo *staRsp; - - TRC3(cmUnpkRguDStaRsp) + RlcMacBOStatus *boSta; + + TRC3(unpackSendBOStatus) if (SUnpkS16(&spId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -1638,12 +1154,12 @@ Buffer *mBuf; if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staRsp, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &boSta, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staRsp, - sizeof(RguDStaRspInfo))) != ROK) { + if ((SGetSBuf(pst->region, pst->pool, (Data **)&boSta, + sizeof(RlcMacBOStatus))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -1652,187 +1168,23 @@ Buffer *mBuf; SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguDStaRspInfo(staRsp, mBuf) != ROK) { + if (unpackBOStatusInfo(boSta, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus)); RETVALUE(RFAILED); } } SPutMsg(mBuf); - (*func)(pst, spId, staRsp); - SPutSBuf(pst->region, pst->pool, (Data *)staRsp, sizeof(RguDStaRspInfo)); + // (*func)(pst, spId, boSta); + SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus)); RETVALUE(ROK); } - -/** -* @brief Status Indication from MAC to RLC - * as a response to the staRsp primitive from RLC. - * Informs RLC of the totalBufferSize and Timing Info - * for the transmission on common channels. -* -* @details -* -* Function : cmPkRguCStaInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCStaIndInfo * staInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaInd -( -Pst* pst, -SuId suId, -RguCStaIndInfo * staInd -) -#else -PUBLIC S16 cmPkRguCStaInd(pst, suId, staInd) -Pst* pst; -SuId suId; -RguCStaIndInfo * staInd; -#endif -{ - Buffer *mBuf = NULLP; - TRC3(cmPkRguCStaInd) - - if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU063, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); - RETVALUE(RFAILED); - } - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKPK(cmPkPtr,(PTR) staInd, mBuf); - } - else - { - if (cmPkRguCStaIndInfo(staInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU064, (ErrVal)0, "Packing failed"); -#endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (SPutSBuf(pst->region, pst->pool, - (Data *)staInd, sizeof(RguCStaIndInfo)) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU066, (ErrVal)0, "Packing failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - staInd = NULLP; - } - if (SPkS16(suId,mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU065, (ErrVal)0, "Packing failed"); -#endif - if (staInd != NULLP) - { - SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguCStaIndInfo)); - } - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - pst->event = (Event) EVTRGUCSTAIND; - RETVALUE(SPstTsk(pst,mBuf)); -} - - -/** -* @brief Status Indication from MAC to RLC - * as a response to the staRsp primitive from RLC. - * Informs RLC of the totalBufferSize and Timing Info - * for the transmission on common channels. -* -* @details -* -* Function : cmUnpkRguCStaInd -* -* @param[in] Pst* pst -* @param[in] SuId suId -* @param[in] RguCStaIndInfo * staInd -* @return S16 -* -# ROK -**/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaInd -( -RguCStaInd func, -Pst *pst, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCStaInd(func, pst, mBuf) -RguCStaInd func; -Pst *pst; -Buffer *mBuf; -#endif -{ - SuId suId; - RguCStaIndInfo *staInd; - - TRC3(cmUnpkRguCStaInd) - - if (SUnpkS16(&suId, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU067, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - - if (pst->selector == RGU_SEL_LWLC) - { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf); - } - else - { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguCStaIndInfo))) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU068, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - RETVALUE(RFAILED); - } - if (cmUnpkRguCStaIndInfo(staInd, mBuf) != ROK) { -#if (ERRCLASS & ERRCLS_ADD_RES) - SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, - __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, - (ErrVal)ERGU069, (ErrVal)0, "UnPacking failed"); -#endif - SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguCStaIndInfo)); - RETVALUE(RFAILED); - } - } - SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, staInd)); -} /*rgu_c_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS @@ -2059,30 +1411,30 @@ Buffer *mBuf; * * @details * -* Function : cmPkRguDStaInd +* Function : packSchedRep * * @param[in] Pst* pst * @param[in] SuId suId -* @param[in] RguDStaIndInfo * staInd +* @param[in] RlcMacSchedRep* schRep * @return S16 * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmPkRguDStaInd +PUBLIC S16 packSchedRep ( Pst* pst, SuId suId, -RguDStaIndInfo * staInd +RlcMacSchedRep * schRep ) #else -PUBLIC S16 cmPkRguDStaInd(pst, suId, staInd) +PUBLIC S16 packSchedRep(pst, suId, staInd) Pst* pst; SuId suId; -RguDStaIndInfo * staInd; +RlcMacSchedRep * schRep; #endif { Buffer *mBuf = NULLP; - TRC3(cmPkRguDStaInd) + TRC3(packSchedRep) if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2090,28 +1442,28 @@ RguDStaIndInfo * staInd; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU076, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRep)); RETVALUE(RFAILED); } if (pst->selector == RGU_SEL_LWLC) { - CMCHKPK(cmPkPtr,(PTR) staInd, mBuf); + CMCHKPK(cmPkPtr,(PTR) schRep, mBuf); } else { - if (cmPkRguDStaIndInfo(staInd, mBuf) != ROK) { + if (packSchedRepInfo(schRep, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU077, (ErrVal)0, "Packing failed"); #endif - SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, + sizeof(RlcMacSchedRep)); SPutMsg(mBuf); RETVALUE(RFAILED); } - if (SPutSBuf(pst->region, pst->pool, (Data *)staInd, - sizeof(RguDStaIndInfo)) != ROK) { + if (SPutSBuf(pst->region, pst->pool, (Data *)schRep, + sizeof(RlcMacSchedRep)) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -2120,7 +1472,7 @@ RguDStaIndInfo * staInd; SPutMsg(mBuf); RETVALUE(RFAILED); } - staInd = NULLP; + schRep= NULLP; } if (SPkS16(suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2128,15 +1480,15 @@ RguDStaIndInfo * staInd; __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU078, (ErrVal)0, "Packing failed"); #endif - if (staInd != NULLP) + if (schRep != NULLP) { - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRep)); } SPutMsg(mBuf); RETVALUE(RFAILED); } - pst->event = (Event) EVTRGUDSTAIND; + pst->event = (Event) EVTSCHREP; RETVALUE(SPstTsk(pst,mBuf)); } @@ -2149,7 +1501,7 @@ RguDStaIndInfo * staInd; * * @details * -* Function : cmUnpkRguDStaInd +* Function : unpackSchedRep * * @param[in] Pst* pst * @param[in] SuId suId @@ -2158,23 +1510,24 @@ RguDStaIndInfo * staInd; * -# ROK **/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDStaInd +PUBLIC S16 unpackSchedRep ( RguDStaInd func, Pst *pst, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDStaInd(func, pst, mBuf) +PUBLIC S16 unpackSchedRep(func, pst, mBuf) RguDStaInd func; Pst *pst; Buffer *mBuf; #endif { SuId suId; - RguDStaIndInfo *staInd; +// RguDStaIndInfo *staInd; + RlcMacSchedRep *schRep; - TRC3(cmUnpkRguDStaInd) + TRC3(unpackSchedRep) if (SUnpkS16(&suId, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) @@ -2187,11 +1540,11 @@ Buffer *mBuf; } if (pst->selector == RGU_SEL_LWLC) { - CMCHKUNPK(cmUnpkPtr,(PTR *) &staInd, mBuf); + CMCHKUNPK(cmUnpkPtr,(PTR *) &schRep, mBuf); } else { - if ((SGetSBuf(pst->region, pst->pool, (Data **)&staInd, sizeof(RguDStaIndInfo))) != ROK) { + if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRep))) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, @@ -2200,19 +1553,19 @@ Buffer *mBuf; SPutMsg(mBuf); RETVALUE(RFAILED); } - if (cmUnpkRguDStaIndInfo(staInd, mBuf) != ROK) { + if (unpackSchedRepInfo(schRep, mBuf) != ROK) { #if (ERRCLASS & ERRCLS_ADD_RES) SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId, __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES, (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed"); #endif SPutMsg(mBuf); - SPutSBuf(pst->region, pst->pool, (Data *)staInd, sizeof(RguDStaIndInfo)); + SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRep)); RETVALUE(RFAILED); } } SPutMsg(mBuf); - RETVALUE((*func)(pst, suId, staInd)); + RETVALUE((*func)(pst, suId, schRep)); } #ifdef ANSI @@ -3316,10 +2669,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmPkRguDDatIndInfo +* Func : packRlcMacDataInfo * * -* Desc : RguDDatIndInfo +* Desc : RlcMacData * Data Indication from MAC to RLC for dedicated channels of a UE * * @@ -3331,31 +2684,37 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmPkRguDDatIndInfo +PUBLIC S16 packRlcMacDataInfo ( -RguDDatIndInfo *param, +RlcMacData *param, Buffer *mBuf ) #else -PUBLIC S16 cmPkRguDDatIndInfo(param, mBuf) -RguDDatIndInfo *param; +PUBLIC S16 packRlcMacDataInfo(param, mBuf) +RlcMacData *param; Buffer *mBuf; #endif { S32 i; + MsgLen msgLen; - TRC3(cmPkRguDDatIndInfo); + TRC3(packRlcMacDataInfo); -#ifdef LTE_L2_MEAS - CMCHKPK(SPkU8, param->burstInd, mBuf); - CMCHKPK(SPkU32, param->ttiCnt, mBuf); -#endif - for (i=param->numLch-1; i >= 0; i--) { - CMCHKPK(cmPkRguLchDatInd, ¶m->lchData[i], mBuf); + for (i=param->nmbPdu-1; i >= 0; i--) + { + MsgLen msgLen = 0; + if (SFndLenMsg(param->pduInfo[i].pduBuf, &msgLen) != ROK) + RETVALUE(RFAILED); + if (SCatMsg(mBuf, param->pduInfo[i].pduBuf, M1M2) != ROK) + RETVALUE(RFAILED); + CMCHKPK(cmPkMsgLen, msgLen, mBuf); + CMCHKPK(cmPkLteLcId, param->pduInfo[i].lcId, mBuf); + CMCHKPK(cmPkBool, param->pduInfo[i].commCh, mBuf); } - CMCHKPK(SPkU8, param->numLch, mBuf); + CMCHKPK(SPkU8, param->nmbPdu, mBuf); CMCHKPK(cmPkLteRnti, param->rnti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); + CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf); RETVALUE(ROK); } @@ -3363,10 +2722,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmUnpkRguDDatIndInfo +* Func : unpackRlcMacDataInfo * * -* Desc : RguDDatIndInfo +* Desc : RlcMacData * Data Indication from MAC to RLC for dedicated channels of a UE * * @@ -3378,31 +2737,37 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDDatIndInfo +PUBLIC S16 unpackRlcMacDataInfo ( -RguDDatIndInfo *param, +RlcMacData *param, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDDatIndInfo(param, mBuf) -RguDDatIndInfo *param; +PUBLIC S16 unpackRlcMacDataInfo(param, mBuf) +RlcMacData *param; Buffer *mBuf; #endif { S32 i; - TRC3(cmUnpkRguDDatIndInfo); - + TRC3(unpackRlcMacDataInfo); + + CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->numLch, mBuf); - for (i=0; inumLch; i++) { - CMCHKUNPK(cmUnpkRguLchDatInd, ¶m->lchData[i], mBuf); + CMCHKUNPK(SUnpkU8, ¶m->nmbPdu, mBuf); + for (i=0; inmbPdu; i++) + { + MsgLen totalMsgLen; + + CMCHKUNPK(cmUnpkBool, ¶m->pduInfo[i].commCh, mBuf); + CMCHKUNPK(cmUnpkLteLcId, ¶m->pduInfo[i].lcId, mBuf); + CMCHKUNPK(cmPkMsgLen, ¶m->pduInfo[i].pduLen, mBuf); + if (SFndLenMsg(mBuf, &totalMsgLen) != ROK) + RETVALUE(RFAILED); + if (SSegMsg(mBuf, totalMsgLen-param->pduInfo[i].pduLen, ¶m->pduInfo[i].pduBuf) != ROK) + RETVALUE(RFAILED); } -#ifdef LTE_L2_MEAS - CMCHKUNPK(SUnpkU32, ¶m->ttiCnt, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->burstInd, mBuf); -#endif RETVALUE(ROK); } @@ -3519,10 +2884,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmPkRguDStaRspInfo +* Func : packBOStatusInfo * * -* Desc : RguDStaRspInfo +* Desc : RlcMacBOStatus * Status Response from RLC to MAC for dedicated logical channel * * @@ -3534,35 +2899,36 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmPkRguDStaRspInfo +PUBLIC S16 packBOStatusInfo ( -RguDStaRspInfo *param, +RlcMacBOStatus *param, Buffer *mBuf ) #else -PUBLIC S16 cmPkRguDStaRspInfo(param, mBuf) -RguDStaRspInfo *param; +PUBLIC S16 packBOStatusInfo(param, mBuf) +RlcMacBOStatus *param; Buffer *mBuf; #endif { - TRC3(cmPkRguDStaRspInfo); + TRC3(packBOStatusInfo); - CMCHKPK(cmPkRguDBoReport, ¶m->boReport, mBuf); + CMCHKPK(SPkS32, param->bo, mBuf); CMCHKPK(cmPkLteLcId, param->lcId, mBuf); + CMCHKPK(cmPkBool, param->commCh, mBuf); CMCHKPK(cmPkLteRnti, param->rnti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); RETVALUE(ROK); -} +} /* End of packBOStatusInfo */ /*********************************************************** * -* Func : cmUnpkRguDStaRspInfo +* Func : unpackBOStatusInfo * * -* Desc : RguDStaRspInfo +* Desc : RlcMacBOStatus * Status Response from RLC to MAC for dedicated logical channel * * @@ -3574,114 +2940,27 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDStaRspInfo +PUBLIC S16 unpackBOStatusInfo ( -RguDStaRspInfo *param, +RlcMacBOStatus *param, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDStaRspInfo(param, mBuf) -RguDStaRspInfo *param; +PUBLIC S16 unpackBOStatusInfo(param, mBuf) +RlcMacBOStatus *param; Buffer *mBuf; #endif { - TRC3(cmUnpkRguDStaRspInfo); + TRC3(unpackBOStatusInfo); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); + CMCHKUNPK(cmUnpkBool, ¶m->commCh, mBuf); CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(cmUnpkRguDBoReport, ¶m->boReport, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmPkRguCStaIndInfo -* -* -* Desc : RguCStaIndInfo - * Status Indication from MAC to RLC for common logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmPkRguCStaIndInfo -( -RguCStaIndInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmPkRguCStaIndInfo(param, mBuf) -RguCStaIndInfo *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmPkRguCStaIndInfo); -#ifdef EMTC_ENBALE - CMCHKPK(cmPkLteTimingInfo, ¶m->pagingTimingInfo, mBuf); - CMCHKPK(SPkU8, param->isEmtcPaging, mBuf); -#endif - CMCHKPK(cmPkLteRnti, param->rnti, mBuf); - CMCHKPK(SPkU32, param->transId, mBuf); - CMCHKPK(cmPkLteLcId, param->lcId, mBuf); - CMCHKPK(cmPkLteCellId, param->cellId, mBuf); - RETVALUE(ROK); -} - - - -/*********************************************************** -* -* Func : cmUnpkRguCStaIndInfo -* -* -* Desc : RguCStaIndInfo - * Status Indication from MAC to RLC for common logical channel -* -* -* Ret : S16 -* -* Notes: -* -* File : -* -**********************************************************/ -#ifdef ANSI -PUBLIC S16 cmUnpkRguCStaIndInfo -( -RguCStaIndInfo *param, -Buffer *mBuf -) -#else -PUBLIC S16 cmUnpkRguCStaIndInfo(param, mBuf) -RguCStaIndInfo *param; -Buffer *mBuf; -#endif -{ - - TRC3(cmUnpkRguCStaIndInfo); - - CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(cmUnpkLteLcId, ¶m->lcId, mBuf); - CMCHKUNPK(SUnpkU32, ¶m->transId, mBuf); - /*TODO:Mukesh: Need to check why rnti unpacking is missing*/ -#ifdef EMTC_ENBALE - CMCHKUNPK(SUnpkU8, ¶m->isEmtcPaging, mBuf); - CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->pagingTimingInfo, mBuf); -#endif + CMCHKUNPK(SUnpkS32, ¶m->bo, mBuf); RETVALUE(ROK); -} - +} /* End of unpackBOStatusInfo */ /*********************************************************** @@ -3850,10 +3129,10 @@ Buffer *mBuf; /*********************************************************** * -* Func : cmPkRguDStaIndInfo +* Func : packSchedRepInfo * * -* Desc : RguDStaIndInfo +* Desc : RlcMacSchedRep * StaInd from MAC to RLC for dedicated logical channels of a UE * * @@ -3865,46 +3144,43 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmPkRguDStaIndInfo +PUBLIC S16 packSchedRepInfo ( -RguDStaIndInfo *param, +RlcMacSchedRep *param, Buffer *mBuf ) #else -PUBLIC S16 cmPkRguDStaIndInfo(param, mBuf) -RguDStaIndInfo *param; +PUBLIC S16 packSchedRepInfo(param, mBuf) +RlcMacSchedRep *param; Buffer *mBuf; #endif { S32 i; S32 idx; - TRC3(cmPkRguDStaIndInfo); + TRC3(packSchedRepInfo); - for(idx = (param->nmbOfUeGrantPerTti - 1); idx >= 0 ; idx--) + for(idx = (param->nmbLch-1); idx >= 0; idx--) { - RguDStaIndPerUe *staInd = ¶m->staInd[idx]; - CMCHKPK(SPkU8, staInd->fillCtrlPdu, mBuf); - for (i=staInd->nmbOfTbs-1; i >= 0; i--) { - CMCHKPK(cmPkRguStaIndTb, &staInd->staIndTb[i], mBuf); - } - CMCHKPK(SPkU8, staInd->nmbOfTbs, mBuf); - CMCHKPK(SPkU32,staInd->transId, mBuf); - CMCHKPK(cmPkLteRnti, staInd->rnti, mBuf); + CMCHKPK(cmPkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf); + CMCHKPK(cmPkBool, param->lchSta[idx].commCh, mBuf); } - CMCHKPK(SPkU8, param->nmbOfUeGrantPerTti, mBuf); + CMCHKPK(SPkU8, param->nmbLch, mBuf); + CMCHKPK(cmPkLteRnti, param->rnti, mBuf); CMCHKPK(cmPkLteCellId, param->cellId, mBuf); + CMCHKPK(cmPkLteTimingInfo, ¶m->timeToTx, mBuf); + RETVALUE(ROK); -} +} /* End of packSchedRepInfo */ /*********************************************************** * -* Func : cmUnpkRguDStaIndInfo +* Func : unpackSchedRepInfo * * -* Desc : RguDStaIndInfo +* Desc : RlcMacSchedRep * StaInd from MAC to RLC for dedicated logical channels of a UE * * @@ -3916,38 +3192,34 @@ Buffer *mBuf; * **********************************************************/ #ifdef ANSI -PUBLIC S16 cmUnpkRguDStaIndInfo +PUBLIC S16 unpackSchedRepInfo ( -RguDStaIndInfo *param, +RlcMacSchedRep *param, Buffer *mBuf ) #else -PUBLIC S16 cmUnpkRguDStaIndInfo(param, mBuf) -RguDStaIndInfo *param; +PUBLIC S16 unpackSchedRepInfo(param, mBuf) +RlcMacSchedRep *param; Buffer *mBuf; #endif { S32 i; S32 idx; - TRC3(cmUnpkRguDStaIndInfo); + TRC3(unpackSchedRepInfo); + CMCHKUNPK(cmUnpkLteTimingInfo, ¶m->timeToTx, mBuf); CMCHKUNPK(cmUnpkLteCellId, ¶m->cellId, mBuf); - CMCHKUNPK(SUnpkU8, ¶m->nmbOfUeGrantPerTti, mBuf); - for(idx = 0; idx < param->nmbOfUeGrantPerTti; idx++) + CMCHKUNPK(cmUnpkLteRnti, ¶m->rnti, mBuf); + CMCHKUNPK(SUnpkU8, ¶m->nmbLch, mBuf); + for(idx = 0; idx < param->nmbLch; idx++) { - RguDStaIndPerUe *staInd = ¶m->staInd[idx]; - CMCHKUNPK(cmUnpkLteRnti, &staInd->rnti, mBuf); - CMCHKUNPK(SUnpkU32, &staInd->transId, mBuf); - CMCHKUNPK(SUnpkU8, &staInd->nmbOfTbs, mBuf); - for (i=0; inmbOfTbs; i++) - { - CMCHKUNPK(cmUnpkRguStaIndTb, &staInd->staIndTb[i], mBuf); - } - CMCHKUNPK(SUnpkU8, &staInd->fillCtrlPdu, mBuf); + CMCHKUNPK(cmUnpkBool, ¶m->lchSta[idx].commCh, mBuf); + CMCHKUNPK(cmUnpkRguLchStaInd, ¶m->lchSta[idx].lchStaInd, mBuf); } + RETVALUE(ROK); -} +} /* End of unpackSchedRepInfo */ #endif diff --git a/src/cm/rgu.h b/src/cm/rgu.h index a9e085bde..e0e9cf93e 100755 --- a/src/cm/rgu.h +++ b/src/cm/rgu.h @@ -66,13 +66,13 @@ extern "C" { #define EVTRGUUBNDREQ 2 /*!< Un-Bind Request */ #define EVTRGUBNDCFM 3 /*!< Bind Confirm */ #define EVTRGUCDATREQ 4 /*!< Common Channel Data Request */ -#define EVTRGUCDATIND 5 /*!< Common Channel Data Indication */ +//#define EVTRGUCDATIND 5 /*!< Common Channel Data Indication */ #define EVTRGUDDATREQ 6 /*!< Dedicated Channel Data Request */ -#define EVTRGUDDATIND 7 /*!< Dedicated Channel Data Indication */ -#define EVTRGUCSTARSP 8 /*!< Common Channel status response */ +#define EVTRLCULDAT 7 /*!< Dedicated Channel Data Indication */ +#define EVTRLCDLDAT 8 /*!< Common Channel status response */ #define EVTRGUCSTAIND 9 /*!< Common Channel status Indication */ -#define EVTRGUDSTARSP 10 /*!< Dedicated Channel status response */ -#define EVTRGUDSTAIND 11 /*!< Dedicated Channel status Indication */ +#define EVTRLCBOSTA 10 /*!< Channel buffer occupancy status response */ +#define EVTSCHREP 11 /*!< Logical Channel Scheduling result report*/ /*rgu_h_001.main_5 - ADD - L2M Support */ #ifdef LTE_L2_MEAS #define EVTRGUHQSTAIND 12 /*!< HARQ status Indication */ diff --git a/src/cm/rgu.x b/src/cm/rgu.x index 980951661..d7eb2f067 100755 --- a/src/cm/rgu.x +++ b/src/cm/rgu.x @@ -396,6 +396,52 @@ typedef struct rguInfoRingElem U8 event; Void *msg; }RguInfoRingElem; + +/* Buffer occupancy status information */ +typedef struct rlcMacBOStatus +{ + CmLteCellId cellId; /*!< CELL ID */ + CmLteRnti rnti; /*!< UE ID */ + Bool commCh; /*!< Common or Dedicated Channel */ + CmLteLcId lcId; /*!< Logical channel ID */ + S32 bo; /*!< Buffer occupancy reported by RLC */ +}RlcMacBOStatus; + +/* Schedule result report from RLC to MAC */ +typedef struct rlcMacLchSta +{ + Bool commCh; /*!