X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_mac_inf.c;h=41f725cdb5b6795fbc6573569ba73def9f2ebd6d;hb=9634ca974c4418c0800090e33d37ef1fe7e8cb30;hp=68379e42940869d8ab33b193ea84127365c1babd;hpb=088bb8763eaf91c139ede025faf2fac7e57d25ed;p=o-du%2Fl2.git diff --git a/src/cm/du_app_mac_inf.c b/src/cm/du_app_mac_inf.c index 68379e429..41f725cdb 100644 --- a/src/cm/du_app_mac_inf.c +++ b/src/cm/du_app_mac_inf.c @@ -356,7 +356,7 @@ uint8_t packMacSlotInd(Pst *pst, SlotIndInfo *slotInfo ) if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) { - DU_LOG("\nDU APP : Memory allocation failed for cell start req pack"); + DU_LOG("\nDU APP : Memory allocation failed for packMacSlotInd"); return RFAILED; } @@ -769,7 +769,7 @@ uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf) * * @details * - * Function : packDuMacUeCreateRsp + * Function : packDuMacUeCfgRsp * * Functionality: * Pack and send UE config response from MAC to DU APP @@ -779,7 +779,7 @@ uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf) * RFAILED - failure * * ****************************************************************/ -uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp) +uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp) { Buffer *mBuf = NULLP; @@ -808,7 +808,7 @@ uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp) * * @details * - * Function : unpackDuMacUeCreateRsp + * Function : unpackDuMacUeCfgRsp * * Functionality: Unpack UE Config Response from MAC to DU APP * @@ -817,11 +817,11 @@ uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp) * RFAILED - failure * * ****************************************************************/ -uint8_t unpackDuMacUeCreateRsp(DuMacUeCreateRspFunc func, Pst *pst, Buffer *mBuf) +uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf) { if(pst->selector == ODU_SELECTOR_LWLC) { - MacUeCfgRsp *cfgRsp; + MacUeCfgRsp *cfgRsp = NULLP; /* unpack the address of the structure */ CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf); @@ -833,6 +833,85 @@ uint8_t unpackDuMacUeCreateRsp(DuMacUeCreateRspFunc func, Pst *pst, Buffer *mBuf return RFAILED; } +/******************************************************************* + * + * @brief Packs and Sends UE Reconig Request from DUAPP to MAC + * + * @details + * + * Function : packDuMacUeReconfigReq + * + * Functionality: + * Packs and Sends UE Reconfig Request from DUAPP to MAC + * + * + * @params[in] Post structure pointer + * MacUeCfg pointer + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg) +{ + Buffer *mBuf = NULLP; + + if(pst->selector == ODU_SELECTOR_LWLC) + { + if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) + { + DU_LOG("\nMAC : Memory allocation failed at packDuMacUeReconfigReq"); + return RFAILED; + } + /* pack the address of the structure */ + CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf); + } + else + { + DU_LOG("\nMAC: Only LWLC supported for packDuMacUeReconfigReq"); + return RFAILED; + } + + return ODU_POST_TASK(pst,mBuf); +} +/******************************************************************* + * + * @brief Unpacks UE Reconfig Request received from DU APP + * + * @details + * + * Function : unpackMacUeReconfigReq + * + * Functionality: + * Unpacks UE Reconfig Request received from DU APP + * + * @params[in] Pointer to Handler + * Post structure pointer + * Message Buffer + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf) +{ + if(pst->selector == ODU_SELECTOR_LWLC) + { + MacUeCfg *ueCfg; + + /* unpack the address of the structure */ + CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf); + ODU_PUT_MSG_BUF(mBuf); + return (*func)(pst, ueCfg); + } + else + { + /* Nothing to do for other selectors */ + DU_LOG("\n Only LWLC supported for UE Create Request "); + ODU_PUT_MSG_BUF(mBuf); + } + + return RFAILED; +} + /********************************************************************** End of file **********************************************************************/