X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_cell_mgr.c;h=65dce4b307fe498989b9cbd8f9c7a21ee1bb831a;hb=4d45b914f9e94203603d3b9fdbcb1aad361301dd;hp=12a967217448f0a1f5700f5df0e5170efeada2a3;hpb=eb178a8cc45a9cebc65df73f128f88b3a3dfefbb;p=o-du%2Fl2.git diff --git a/src/du_app/du_cell_mgr.c b/src/du_app/du_cell_mgr.c index 12a967217..65dce4b30 100644 --- a/src/du_app/du_cell_mgr.c +++ b/src/du_app/du_cell_mgr.c @@ -22,14 +22,22 @@ #include "legtp.h" #include "lrg.x" #include "lkw.x" -#include "du_cfg.h" +#include "rgr.h" +#include "rgr.x" #include "E2AP-PDU.h" #include #include "F1AP-PDU.h" +#include "du_e2ap_msg_hdl.h" +#include "du_app_mac_inf.h" +#include "du_app_rlc_inf.h" +#include "du_cfg.h" +#include "du_mgr.h" +#include "odu_common_codec.h" #include "du_cell_mgr.h" +#include "du_f1ap_msg_hdl.h" extern DuCfgParams duCfgParam; -extern S16 duBuildAndSendMacCellCfg(); +extern uint8_t duBuildAndSendMacCellCfg(); /******************************************************************* * @@ -47,22 +55,22 @@ extern S16 duBuildAndSendMacCellCfg(); * RFAILED - failure * * ****************************************************************/ -S16 procCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate) +uint8_t procCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate) { - U16 idx = 0; - S16 ret = ROK; + uint16_t idx = 0; + uint8_t ret = ROK; for(idx=0; idx\ value.choice.Cells_to_be_Activated_List_Item; bitStringToInt(&cell.nRCGI.nRCellIdentity, &nci); - if(nci <= 0 || nci > DU_MAX_CELLS) + if(nci <= 0 || nci > MAX_NUM_CELL) { DU_LOG("\nDU APP : Invalid NCI %d", nci); return RFAILED; @@ -86,7 +94,7 @@ S16 procCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate) /* Now remove this cell from configured list and move to active list */ duCb.cfgCellLst[nci-1] = NULL; duCb.actvCellLst[nci-1] = cellCb; - + duCb.numActvCells++; /* Build and send Mac Cell Cfg for the number of active cells */ ret = duBuildAndSendMacCellCfg(); if(ret != ROK) @@ -121,7 +129,7 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg) F1SetupRsp f1SetRspDb; GNB_CU_Name_t *cuName; RRC_Version_t *rrc_Ver; - U16 idx; + uint16_t idx; DU_LOG("\nDU_APP : F1 Setup Response received"); printf("\nDU_APP : F1 Setup Response received"); @@ -169,11 +177,9 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg) /* TODO :Check the deallocation */ #if 0 - SPutSBuf(DU_APP_MEM_REGION, DU_POOL,(Data *)&(f1SetupRsp->protocolIEs.list.array),\ - (Size)elementCnt * sizeof(F1SetupResponseIEs_t *)); - SPutSBuf(DU_APP_MEM_REGION, DU_POOL,(Data *)&(f1apMsg->choice.successfulOutcome),\ - (Size)sizeof(SuccessfulOutcome_t)); - SPutSBuf(DU_APP_MEM_REGION, DU_POOL,(Data *)&f1apMsg,(Size)sizeof(F1AP_PDU_t)); + DU_FREE(f1SetupRsp->protocolIEs.list.array,(Size)elementCnt * sizeof(F1SetupResponseIEs_t *)); + DU_FREE(f1apMsg->choice.successfulOutcome,(Size)sizeof(SuccessfulOutcome_t)); + DU_FREE(f1apMsg,(Size)sizeof(F1AP_PDU_t)); #endif return ret; @@ -194,17 +200,14 @@ uint8_t procF1SetupRsp(F1AP_PDU_t *f1apMsg) * RFAILED - failure * * ****************************************************************/ -S16 procGNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg) +uint8_t procGNBDUCfgUpdAck(F1AP_PDU_t *f1apMsg) { DU_LOG("\nF1AP : GNB-DU config update acknowledgment received"); /* TODO :Check the deallocation */ #if 0 - SPutSBuf(DU_APP_MEM_REGION,DU_POOL,(Data*)&(gNBDuCfgAck->protocolIEs.list.array),\ - (Size)elementCnt * sizeof(GNBDUConfigurationUpdateAcknowledgeIEs_t -)); - SPutSBuf(DU_APP_MEM_REGION,DU_POOL,(Data*)&(f1apMsg->choice.successfulOutcome),\ - (Size)sizeof(SuccessfulOutcome_t)); - SPutSBuf(DU_APP_MEM_REGION,DU_POOL,(Data*)&f1apMsg,(Size)sizeof(F1AP_PDU_t)); + DU_FREE(gNBDuCfgAck->protocolIEs.list.array,(Size)elementCnt * sizeof(GNBDUConfigurationUpdateAcknowledgeIEs_t)); + DU_FREE(f1apMsg->choice.successfulOutcome,(Size)sizeof(SuccessfulOutcome_t)); + DU_FREE(f1apMsg,(Size)sizeof(F1AP_PDU_t)); #endif return ROK; }