/* This file contains message handling functionality for DU APP */
#include "common_def.h"
#include "lrg.h"
+#include "du_tmr.h"
#include "legtp.h"
#include "lkw.h"
#include "kwu.h"
#include "kwu.x"
#include "du_app_mac_inf.h"
#include "du_app_rlc_inf.h"
+#include "du_e2ap_mgr.h"
#include "du_cfg.h"
#include "du_app_rlc_inf.h"
#include "du_mgr.h"
return ROK;
}
-/*******************************************************************
- *
- * @brief free the slice cfg rsp
- *
- * @details
- *
- * Function : duFreeSliceCfgRsp
- *
- * Functionality: free the slice cfg rsp
- *
- * @params[in] Post structure, MacSliceCfgRsp *cfgRsp
- *
- * @return ROK - success
- * RFAILED - failure
- *
- **********************************************************************/
-void duFreeSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp)
-{
- uint8_t cfgIdx;
-
- if(cfgRsp)
- {
- if(cfgRsp->numSliceCfgRsp)
- {
- for(cfgIdx = 0; cfgIdx<cfgRsp->numSliceCfgRsp; cfgIdx++)
- {
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp->listOfSliceCfgRsp[cfgIdx], sizeof(MacSliceRsp));
- }
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp->listOfSliceCfgRsp, cfgRsp->numSliceCfgRsp * sizeof(MacSliceRsp*));
- }
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacSliceCfgRsp));
- }
-}
-
/*******************************************************************
*
* @brief process the slice cfg rsp received from MAC
**********************************************************************/
uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp)
{
- uint8_t cfgIdx = 0;
-
if(cfgRsp)
{
- if(cfgRsp->listOfSliceCfgRsp)
- {
- for(cfgIdx = 0; cfgIdx<cfgRsp->numSliceCfgRsp; cfgIdx++)
- {
- if(cfgRsp->listOfSliceCfgRsp[cfgIdx]->rsp == MAC_DU_APP_RSP_OK)
- {
- duCb.sliceState = SLICE_CONFIGURED;
- }
- }
- DU_LOG("\nINFO --> DU_APP : Slice Configuration is done successfully ");
- }
- duFreeSliceCfgRsp(pst, cfgRsp);
+ if(cfgRsp->rsp == MAC_DU_APP_RSP_OK)
+ {
+ duCb.sliceState = SLICE_CONFIGURED;
+ DU_LOG("\nINFO --> DU_APP : Slice configured successfully ");
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP : Slice not available");
+ }
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacSliceCfgRsp));
}
return ROK;
}
* RFAILED - failure
*
**********************************************************************/
-uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *reCfgRsp)
+uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *recfgRsp)
{
- uint8_t cfgIdx = 0;
-
- if(reCfgRsp)
+ if(recfgRsp)
{
- if(reCfgRsp->listOfSliceCfgRsp)
+ if(recfgRsp->rsp == MAC_DU_APP_RSP_OK)
{
- for(cfgIdx = 0; cfgIdx < reCfgRsp->numSliceCfgRsp; cfgIdx++)
- {
- if(reCfgRsp->listOfSliceCfgRsp[cfgIdx]->rsp == MAC_DU_APP_RSP_OK)
- {
- duCb.sliceState = SLICE_RECONFIGURED;
- }
- else
- {
- DU_LOG("\nERROR --> DU_APP : Slice not available");
- }
- }
- DU_LOG("\nINFO --> DU_APP : Slice ReCOnfiguration response received");
+ duCb.sliceState = SLICE_RECONFIGURED;
+ DU_LOG("\nINFO --> DU_APP : Slice Reconfigured successfully ");
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP : Slice not available");
}
- duFreeSliceCfgRsp(pst, reCfgRsp);
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, recfgRsp, sizeof(MacSliceCfgRsp));
}
return ROK;
}