X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_mac_inf.c;h=3fe519dd8045295ff6474a53c3d7461a3d1c1abd;hb=07a3604e42e6b03158e5ce6f1f2bc0e551572079;hp=ba446929c03d4a5c92ca5cad59216f8c463ae829;hpb=4e803fe4bcf3a446b7082675d25d35ad102f16f6;p=o-du%2Fl2.git diff --git a/src/cm/du_app_mac_inf.c b/src/cm/du_app_mac_inf.c index ba446929c..3fe519dd8 100644 --- a/src/cm/du_app_mac_inf.c +++ b/src/cm/du_app_mac_inf.c @@ -17,10 +17,6 @@ *******************************************************************************/ #include "common_def.h" -#include "ss_queue.h" -#include "ss_task.h" -#include "ss_msg.h" -#include "du_cfg.h" #include "du_app_mac_inf.h" /************************************************************************** @@ -40,7 +36,7 @@ * RFAILED - failure * ***************************************************************************/ -int packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg) +uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg) { if(pst->selector == ODU_SELECTOR_LC) { @@ -83,10 +79,7 @@ int packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg) * RFAILED - failure * ***************************************************************************/ -int unpackDuMacCellCfg( - DuMacCellCfgReq func, - Pst *pst, - Buffer *mBuf) +uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf) { U16 ret = ROK; MacCellCfg *macCellCfg; @@ -123,7 +116,7 @@ int unpackDuMacCellCfg( * RFAILED - failure * ***************************************************************************/ -int packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) +uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) { if(pst->selector == ODU_SELECTOR_LC) { @@ -134,8 +127,8 @@ int packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) } /* pack the transaction ID in CNF structure */ + CMCHKPK(SPkU16, macCellCfgCfm->cellId, mBuf); CMCHKPK(SPkU8, macCellCfgCfm->rsp, mBuf); - CMCHKPK(SPkU16, macCellCfgCfm->transId, mBuf); return SPstTsk(pst,mBuf); } @@ -164,19 +157,15 @@ int packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm) * RFAILED - failure * ***************************************************************************/ -int unpackMacCellCfgCfm( - DuMacCellCfgCfm func, - Pst *pst, - Buffer *mBuf) +uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf) { MacCellCfgCfm macCellCfgCfm; if(pst->selector == ODU_SELECTOR_LC) { /* unpack the transaction ID in CNF structure */ - CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf); CMCHKUNPK(SUnpkU8, &(macCellCfgCfm.rsp), mBuf); - + CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.cellId), mBuf); return (*func)(pst, &macCellCfgCfm); } else @@ -203,7 +192,7 @@ int unpackMacCellCfgCfm( * RFAILED - failure * * ****************************************************************/ -uint16_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo) +uint8_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo) { Buffer *mBuf = NULLP; @@ -246,7 +235,7 @@ uint16_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo) * RFAILED - failure * * ****************************************************************/ -uint16_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf) +uint8_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf) { MacCellStartInfo *cellStartInfo; @@ -282,7 +271,7 @@ uint16_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf) * RFAILED - failure * * ****************************************************************/ -uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo) +uint8_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo) { if(pst->selector == ODU_SELECTOR_LC) { @@ -325,7 +314,7 @@ uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo) * RFAILED - failure * * ****************************************************************/ -uint16_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf) +uint8_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf) { MacCellStopInfo *cellStopInfo; @@ -361,7 +350,7 @@ uint16_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf) * RFAILED - failure * * ****************************************************************/ -uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo ) +uint8_t packMacSlotInd(Pst *pst, SlotIndInfo *slotInfo ) { Buffer *mBuf = NULLP; @@ -377,7 +366,7 @@ uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo ) CMCHKPK(SPkU16, slotInfo->sfn, mBuf); CMCHKPK(SPkU16, slotInfo->slot, mBuf); - CM_FREE_SHRABL_BUF(pst->region, pst->pool, slotInfo, sizeof(SlotInfo)); + CM_FREE_SHRABL_BUF(pst->region, pst->pool, slotInfo, sizeof(SlotIndInfo)); slotInfo = NULL; } else if(pst->selector == ODU_SELECTOR_LWLC) @@ -411,11 +400,11 @@ uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo ) * RFAILED - failure * * ****************************************************************/ -uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf) +uint8_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf) { if(pst->selector == ODU_SELECTOR_LWLC) { - SlotInfo *slotInfo; + SlotIndInfo *slotInfo; /* unpack the address of the structure */ CMCHKUNPK(cmUnpkPtr, (PTR *)&slotInfo, mBuf); @@ -424,7 +413,7 @@ uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf) } else if(pst->selector == ODU_SELECTOR_LC) { - SlotInfo slotInfo; + SlotIndInfo slotInfo; CMCHKUNPK(SUnpkU16, &(slotInfo.slot), mBuf); CMCHKUNPK(SUnpkU16, &(slotInfo.sfn), mBuf); @@ -459,7 +448,7 @@ uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf) * RFAILED - failure * * ****************************************************************/ -uint16_t packMacStopInd(Pst *pst, MacCellStopInfo *cellStopId) +uint8_t packMacStopInd(Pst *pst, MacCellStopInfo *cellStopId) { Buffer *mBuf = NULLP; @@ -508,7 +497,7 @@ uint16_t packMacStopInd(Pst *pst, MacCellStopInfo *cellStopId) * RFAILED - failure * * ****************************************************************/ -uint16_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf) +uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf) { if(pst->selector == ODU_SELECTOR_LWLC) { @@ -553,7 +542,7 @@ uint16_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf) * RFAILED - failure * * ****************************************************************/ -uint16_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo) +uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo) { Buffer *mBuf = NULLP; @@ -594,7 +583,7 @@ uint16_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo) * RFAILED - failure * * ****************************************************************/ -uint16_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf) +uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf) { if(pst->selector == ODU_SELECTOR_LWLC) { @@ -632,7 +621,7 @@ uint16_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf) * RFAILED - failure * * ****************************************************************/ -uint16_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo) +uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo) { Buffer *mBuf = NULLP; @@ -673,7 +662,7 @@ uint16_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo) * RFAILED - failure * * ****************************************************************/ -uint16_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf) +uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf) { if(pst->selector == ODU_SELECTOR_LWLC) {