struct macCellCb
{
- uint16_t cellId;
- uint16_t numOfSlots;
- MacCellStatus state;
- uint16_t crntiMap;
- MacRaCbInfo macRaCb[MAX_NUM_UE];
- MacDlSlot dlSlot[MAX_SLOTS];
- MacUlSlot ulSlot[MAX_SLOTS];
- uint16_t numActvUe;
- MacUeCfg *ueCfgTmpData[MAX_NUM_UE];
- MacUeRecfg *ueRecfgTmpData[MAX_NUM_UE];
- MacUeCb ueCb[MAX_NUM_UE];
- MacCellCfg macCellCfg;
- SlotTimingInfo currTime;
+ uint16_t cellId;
+ uint16_t numOfSlots;
+ MacCellStatus state;
+ uint16_t crntiMap;
+ MacRaCbInfo macRaCb[MAX_NUM_UE];
+ MacDlSlot dlSlot[MAX_SLOTS];
+ MacUlSlot ulSlot[MAX_SLOTS];
+ uint16_t numActvUe;
+ MacUeCreateReq *ueCfgTmpData[MAX_NUM_UE];
+ MacUeRecfg *ueRecfgTmpData[MAX_NUM_UE];
+ MacUeCb ueCb[MAX_NUM_UE];
+ MacCellCfg macCellCfg;
+ SlotTimingInfo currTime;
};
typedef struct macCb
}
return ret;
}
+
+/**
+ * @brief Mac process the downlink Broadcast Req received from DUAPP
+ *
+ * @details
+ *
+ * Function : MacProcDlBroadcastReq
+ *
+ * This function process the downlink Broadcast Req received from DUAPP
+ *
+ * @param[in] Pst *pst
+ * @param[in] DlBroadcastReq *dlBroadcastReq
+ * @return int
+ * -# ROK
+ **/
+uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq)
+{
+ uint8_t ret = ROK, idx=0;
+ uint16_t cellIdx = 0;
+
+ if(dlBroadcastReq)
+ {
+ DU_LOG("\nINFO --> MAC : Received DL braodcast req from DU_APP for cellId[%d]", dlBroadcastReq->cellId);
+
+ GET_CELL_IDX(dlBroadcastReq->cellId, cellIdx);
+
+ if(macCb.macCell[cellIdx] == NULLP || macCb.macCell[cellIdx]->cellId != dlBroadcastReq->cellId)
+ {
+ ret = RFAILED;
+ DU_LOG("\nERROR --> MAC : MacProcDlBroadcastReq(): CellId[%d] does not exist", dlBroadcastReq->cellId);
+ }
+ else
+ {
+ /*TODO - Complete the processing of DL Broadcast Request*/
+ }
+ for(idx = 0; idx<dlBroadcastReq->numSiBlock; idx++)
+ {
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, dlBroadcastReq->siSchedulingInfo[idx]->siAreaID, sizeof(uint8_t));
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, dlBroadcastReq->siSchedulingInfo[idx], sizeof(SiSchedulingInfo));
+ }
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, dlBroadcastReq, sizeof(MacDlBroadcastReq));
+ }
+ else
+ {
+ ret = RFAILED;
+ DU_LOG("\nERROR --> MAC : MacProcDlBroadcastReq(): Received Null pointer");
+ }
+ return ret;
+}
/**********************************************************************
End of file
**********************************************************************/
unpackMacDlPcchInd(MacProcDlPcchInd, pst, mBuf);
break;
}
+ case EVENT_MAC_DL_BROADCAST_REQ:
+ {
+ /* Process Dl Broadcast Request */
+ unpackMacDlBroadcastReq(MacProcDlBroadcastReq, pst, mBuf);
+ break;
+ }
+
case EVENT_MAC_UE_RESET_REQ:
{
/* Process UE Reset Request */
#include "mac.h"
#include "mac_utils.h"
-MacDuUeCfgRspFunc macDuUeCfgRspOpts[] =
+MacDuUeCreateRspFunc macDuUeCreateRspOpts[] =
{
- packDuMacUeCfgRsp, /* packing for loosely coupled */
- DuProcMacUeCfgRsp, /* packing for tightly coupled */
- packDuMacUeCfgRsp /* packing for light weight loosly coupled */
+ packDuMacUeCreateRsp, /* packing for loosely coupled */
+ DuProcMacUeCreateRsp, /* packing for tightly coupled */
+ packDuMacUeCreateRsp /* packing for light weight loosly coupled */
};
MacDuUeRecfgRspFunc macDuUeRecfgRspOpts[] =
*
* ****************************************************************/
-uint8_t fillSchLcCfgList(SchUeCfgReq *schUeCfg, MacUeCfg *ueCfg)
+uint8_t fillSchLcCfgList(SchUeCfgReq *schUeCfg, MacUeCreateReq *ueCfg)
{
uint8_t lcIdx;
* RFAILED - failure
*
* ****************************************************************/
-uint8_t fillSchUeCfg(SchUeCfgReq *schUeCfg, MacUeCfg *ueCfg)
+uint8_t fillSchUeCfg(SchUeCfgReq *schUeCfg, MacUeCreateReq *ueCfg)
{
uint8_t ret = ROK;
*
* ****************************************************************/
-uint8_t fillMacLcCfgList(MacUeCb *ueCb, MacUeCfg *ueCfg)
+uint8_t fillMacLcCfgList(MacUeCb *ueCb, MacUeCreateReq *ueCfg)
{
uint8_t lcIdx = 0;
*
* ****************************************************************/
-uint8_t fillMacUeCb(MacUeCb *ueCb, MacUeCfg *ueCfg, uint8_t cellIdx)
+uint8_t fillMacUeCb(MacUeCb *ueCb, MacUeCreateReq *ueCfg, uint8_t cellIdx)
{
uint8_t ret = ROK;
* RFAILED - failure
*
* ****************************************************************/
-uint8_t createUeCb(uint8_t cellIdx, MacUeCb *ueCb, MacUeCfg *ueCfg)
+uint8_t createUeCb(uint8_t cellIdx, MacUeCb *ueCb, MacUeCreateReq *ueCfg)
{
uint8_t ret = ROK;
uint8_t hqProcIdx = 0;
*
* ****************************************************************/
-uint8_t procMacUeCfgData(Pst *pst, MacUeCfg *ueCfg, MacUeRecfg *ueRecfg)
+uint8_t procMacUeCfgData(Pst *pst, MacUeCreateReq *ueCfg, MacUeRecfg *ueRecfg)
{
uint8_t ret = ROK, ueId = 0;
uint16_t cellIdx, cellId;
*
* Functionality: Function to store the UeCfg Data
*
- * @params[in] MacUeCfg pointer
+ * @params[in] MacUeCreateReq pointer
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t copyToTmpData(MacUeCfg *ueCfg, MacUeRecfg *ueRecfg)
+uint8_t copyToTmpData(MacUeCreateReq *ueCfg, MacUeRecfg *ueRecfg)
{
uint8_t cellIdx;
if(ueCfg != NULLP)
{
- MacUeCfg *tmpData = NULLP;
+ MacUeCreateReq *tmpData = NULLP;
- MAC_ALLOC(tmpData, sizeof(MacUeCfg));
+ MAC_ALLOC(tmpData, sizeof(MacUeCreateReq));
if(!tmpData)
{
DU_LOG("\nERROR --> MAC: Memory Alloc Failed at copyToTmpData()");
return RFAILED;
}
- memcpy(tmpData, ueCfg, sizeof(MacUeCfg));
+ memcpy(tmpData, ueCfg, sizeof(MacUeCreateReq));
GET_CELL_IDX(ueCfg->cellId, cellIdx);
macCb.macCell[cellIdx]->ueCfgTmpData[ueCfg->ueId-1] = tmpData;
}
* RFAILED - failure
*
* ****************************************************************/
-uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg)
+uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg)
{
uint8_t ret = ROK;
SchUeCfgReq schUeCfg;
ret = RFAILED;
}
/* FREE shared memory */
- MAC_FREE_SHRABL_BUF(pst->region, pst->pool, ueCfg, sizeof(MacUeCfg));
+ MAC_FREE_SHRABL_BUF(pst->region, pst->pool, ueCfg, sizeof(MacUeCreateReq));
return ret;
}
* ****************************************************************/
uint8_t MacSendUeCreateRsp(MacRsp result, SchUeCfgRsp *schCfgRsp)
{
- MacUeCfgRsp *cfgRsp;
+ MacUeCreateRsp *cfgRsp;
Pst rspPst;
- MAC_ALLOC_SHRABL_BUF(cfgRsp, sizeof(MacUeCfgRsp));
+ MAC_ALLOC_SHRABL_BUF(cfgRsp, sizeof(MacUeCreateRsp));
if(!cfgRsp)
{
DU_LOG("\nERROR --> MAC: Memory allocation for UE config response failed");
}
/* Filling UE Config response */
- memset(cfgRsp, 0, sizeof(MacUeCfgRsp));
+ memset(cfgRsp, 0, sizeof(MacUeCreateRsp));
cfgRsp->cellId = schCfgRsp->cellId;
cfgRsp->ueId = schCfgRsp->ueId;
cfgRsp->result = result;
/* Fill Post structure and send UE Create response*/
memset(&rspPst, 0, sizeof(Pst));
FILL_PST_MAC_TO_DUAPP(rspPst, EVENT_MAC_UE_CREATE_RSP);
- return (*macDuUeCfgRspOpts[rspPst.selector])(&rspPst, cfgRsp);
+ return (*macDuUeCreateRspOpts[rspPst.selector])(&rspPst, cfgRsp);
}
/*******************************************************************
*
* @params[in] cellIdx, ueId
*
- * @return MacUeCfg pointer - success
+ * @return MacUeCreateReq pointer - success
* NULLP - failure
*
* ****************************************************************/
-MacUeCfg *getMacUeCfg(uint16_t cellIdx, uint8_t ueId)
+MacUeCreateReq *getMacUeCfg(uint16_t cellIdx, uint8_t ueId)
{
- MacUeCfg *ueCfg = NULLP;
+ MacUeCreateReq *ueCfg = NULLP;
if(macCb.macCell[cellIdx])
{
ueCfg = macCb.macCell[cellIdx]->ueCfgTmpData[ueId-1];
uint8_t result = MAC_DU_APP_RSP_NOK;
uint8_t ret = ROK;
uint16_t cellIdx;
- MacUeCfg *ueCfg = NULLP;
+ MacUeCreateReq *ueCfg = NULLP;
#ifdef CALL_FLOW_DEBUG_LOG
switch(pst->event)
DU_LOG("\nERROR --> MAC: SCH UeConfigRsp for CRNTI[%d] is failed in MacProcSchUeCfgRsp()", schCfgRsp->crnti);
}
ret = MacSendUeCreateRsp(result, schCfgRsp);
- MAC_FREE(ueCfg, sizeof(MacUeCfg));
+ MAC_FREE(ueCfg, sizeof(MacUeCreateReq));
ueCfg = NULLP;
return ret;
}
if(tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_CREATE_REQ)
{
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_CREATE_RSP);
- SendRlcUeCfgRspToDu(&rspPst, cfgCfm);
+ SendRlcUeCreateRspToDu(&rspPst, cfgCfm);
}
else if(tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_RECONFIG_REQ)
{
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_RSP);
- SendRlcUeCfgRspToDu(&rspPst, cfgCfm);
+ SendRlcUeReconfigRspToDu(&rspPst, cfgCfm);
}
else if (tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_DELETE_REQ)
{
}
RLC_FREE(tRlcCb, cfgCfm, sizeof(RlcCfgCfmInfo));
}
+ else if (tRlcCb->u.ulCb->rlcUlUdxEventType == EVENT_RLC_UE_REESTABLISH_REQ)
+ {
+ if(sendRlcUeReestablishRspToDu(cfgCfm->cellId, cfgCfm->ueId, SUCCESSFUL) != ROK)
+ {
+ DU_LOG("ERROR --> RLC_UL: rlcUlUdxCfgCfm(): Failed to send UE Reestablishment response to DU ");
+ RLC_FREE(tRlcCb, cfgCfm, sizeof(RlcCfgCfmInfo));
+ return RFAILED;
+ }
+ RLC_FREE(tRlcCb, cfgCfm, sizeof(RlcCfgCfmInfo));
+ }
/* free the memory from DL */
RLC_FREE_SHRABL_BUF(pst->region, pst->pool, cfmInfo, sizeof(RlcCfgCfmInfo));
#include "du_app_rlc_inf.h"
#include "rlc_mgr.h"
-RlcDuUeCfgRsp rlcUeCfgRspOpts[] =
+RlcDuUeCreateRsp rlcUeCreateRspOpts[] =
{
- packRlcDuUeCfgRsp, /* 0 - loosely coupled */
- DuProcRlcUeCfgRsp, /* 1 - tightly coupled */
- packRlcDuUeCfgRsp /* 2 - LWLC loosely coupled */
+ packRlcDuUeCreateRsp, /* 0 - loosely coupled */
+ DuProcRlcUeCreateRsp, /* 1 - tightly coupled */
+ packRlcDuUeCreateRsp /* 2 - LWLC loosely coupled */
};
+RlcDuUeReconfigRsp rlcUeReconfigRspOpts[] =
+{
+ packRlcDuUeReconfigRsp, /* 0 - loosely coupled */
+ DuProcRlcUeReconfigRsp, /* 1 - tightly coupled */
+ packRlcDuUeReconfigRsp /* 2 - LWLC loosely coupled */
+};
/***********************************************************
*
* -# RFAILED
*
*************************************************************/
-uint8_t SendRlcUeCfgRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp)
+uint8_t SendRlcUeCreateRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp)
{
/* jump to specific primitive depending on configured selector */
uint8_t ret = ROK;
RlcCb *gCb;
- RlcUeCfgRsp *ueRsp = NULLP;
+ RlcUeCreateRsp *ueRsp = NULLP;
gCb = RLC_GET_RLCCB(pst->srcInst);
- RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCfgRsp));
+ RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCreateRsp));
if(!ueRsp)
{
DU_LOG("\nERROR --> RLC: Memory allocation failed for ueRsp at SendRlcUeCreateRspToDu()");
else
{
/* Mapping Old api to New Api */
- ret = fillRlcUeCfgRsp(ueRsp, cfgRsp);
+ ret = fillRlcUeCreateRsp(ueRsp, cfgRsp);
+ if(!ret)
+ {
+ ret = (*rlcUeCreateRspOpts[pst->selector])(pst, ueRsp);
+ if(ret)
+ {
+ DU_LOG("\nERROR --> RLC: Failed at SendRlcUeCreateRspToDu()");
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCreateRsp));
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Failed at fillRlcUeCreateRsp() for event %d", pst->event);
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCreateRsp));
+ }
+ }
+ RLC_FREE(gCb, cfgRsp, sizeof(RlcCfgCfmInfo));
+ return ret;
+} /* end of SendRlcUeCreateRspToDu */
+
+/***********************************************************
+ *
+ * @brief
+ *
+ * Handler for the ue Reconfig response to DUAPP
+ *
+ * @b Description:
+ *
+ * This function reports ue Reconfig response to DUAPP
+ *
+ * @param[in] post Post structure
+ * @param[in] cfgRsp ue reconfig Config Response
+ *
+ * @return uint16_t
+ * -# ROK
+ * -# RFAILED
+ *
+ *************************************************************/
+uint8_t SendRlcUeReconfigRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp)
+{
+ /* jump to specific primitive depending on configured selector */
+ uint8_t ret = ROK;
+ RlcCb *gCb;
+ RlcUeReconfigRsp *ueRsp = NULLP;
+
+ gCb = RLC_GET_RLCCB(pst->srcInst);
+ RLC_ALLOC_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeReconfigRsp));
+ if(!ueRsp)
+ {
+ DU_LOG("\nERROR --> RLC: Memory allocation failed for ueRsp at SendRlcUeReconfigRspToDu()");
+ ret = RFAILED;
+ }
+ else
+ {
+ /* Mapping Old api to New Api */
+ ret = fillRlcUeCreateRsp(ueRsp, cfgRsp);
if(!ret)
{
- ret = (*rlcUeCfgRspOpts[pst->selector])(pst, ueRsp);
+ ret = (*rlcUeReconfigRspOpts[pst->selector])(pst, ueRsp);
if(ret)
{
- DU_LOG("\nERROR --> RLC: Failed at SendRlcUeCfgRspToDu()");
- RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCfgRsp));
+ DU_LOG("\nERROR --> RLC: Failed at SendRlcUeReconfigRspToDu()");
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeReconfigRsp));
}
}
else
{
- DU_LOG("\nERROR --> RLC: Failed at fillRlcUeCfgRsp() for event %d", pst->event);
- RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeCfgRsp));
+ DU_LOG("\nERROR --> RLC: Failed at fillRlcUeCreateRsp() for event %d", pst->event);
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueRsp, sizeof(RlcUeReconfigRsp));
}
}
RLC_FREE(gCb, cfgRsp, sizeof(RlcCfgCfmInfo));
return ret;
-} /* end of SendRlcUeCfgRspToDu */
+} /* end of SendRlcUeReconfigRspToDu */
/**********************************************************************
End of file
*******************************************************************************/
/* This file stores defines used at RLC interface */
-uint8_t fillRlcUeCfgRsp(RlcUeCfgRsp *rlcCfgRsp, RlcCfgCfmInfo *rlcCRsp);
-uint8_t SendRlcUeCfgRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp);
+uint8_t fillRlcUeCreateRsp(RlcUeCreateRsp *rlcCfgRsp, RlcCfgCfmInfo *rlcCRsp);
+uint8_t SendRlcUeCreateRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp);
+uint8_t SendRlcUeReconfigRspToDu(Pst *pst, RlcCfgCfmInfo *cfgRsp);
uint8_t sendRlcUeDeleteRspToDu(uint16_t cellId, uint8_t ueId, CauseOfResult status);
-
+uint8_t sendRlcUeReestablishRspToDu(uint16_t cellId,uint8_t ueId, CauseOfResult status);
/**********************************************************************
End of file
**********************************************************************/
#include "du_app_rlc_inf.h"
#include "rlc_upr_inf_api.h"
#include "rlc_mgr.h"
+
+/*******************************************************************
+ *
+ * @brief building and sending UE max retransmission info to DU
+ *
+ * @details
+ *
+ * Function : BuildAndSendRlcMaxRetransIndToDu
+ *
+ * Functionality:
+ * Building and sending UE max retransmission information to DU
+ *
+ * @params[in] uint8_t cellId, uint8_t ueId, CauseOfResult status
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t BuildAndSendRlcMaxRetransIndToDu(uint16_t cellId,uint8_t ueId, uint8_t lcId, uint8_t lcType)
+{
+ Pst pst;
+ RlcMaxRetransInfo *maxRetransInfo = NULLP;
+
+ FILL_PST_RLC_TO_DUAPP(pst, RLC_UL_INST, EVENT_RLC_MAX_RETRANSMISSION);
+
+ RLC_ALLOC_SHRABL_BUF(pst.region, pst.pool, maxRetransInfo, sizeof(RlcMaxRetransInfo));
+ if(!maxRetransInfo)
+ {
+ DU_LOG("\nERROR --> RLC: sendRlcMaxRetransIndToDu(): Memory allocation failed ");
+ return RFAILED;
+ }
+ else
+ {
+ maxRetransInfo->cellId = cellId;
+ maxRetransInfo->ueId = ueId;
+ maxRetransInfo->lcId = lcId;
+ maxRetransInfo->lcType = lcType;
+
+ if(rlcSendMaxRetransIndToDu(&pst, maxRetransInfo) == ROK)
+ {
+ DU_LOG("\nDEBUG --> RLC: UE [ %d] max retransmission information sent successfully",ueId);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: SendRlcMaxRetransIndToDu(): fail to send UeId's[%d] maximum retransmission information", ueId);
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, maxRetransInfo, sizeof(RlcMaxRetransInfo));
+ return RFAILED;
+ }
+ }
+ return ROK;
+}
+
/*******************************************************************
*
* @brief Fills RLC UL UE Cfg Rsp from RlcCRsp
*
* @details
*
- * Function : fillRlcUeCfgRsp
+ * Function : fillRlcUeCreateRsp
*
* Functionality:
* Fills RLC UL UE Cfg Rsp from RlcCRsp
*
* @params[in] Pointer to RlcCfgCfm
- * Pointer to RlcUeCfgRsp
+ * Pointer to RlcUeCreateRsp
*
* @return ROK/RFAILED
*
*****************************************************************/
-uint8_t fillRlcUeCfgRsp(RlcUeCfgRsp *rlcCfgRsp, RlcCfgCfmInfo *rlcCRsp)
+uint8_t fillRlcUeCreateRsp(RlcUeCreateRsp *rlcCfgRsp, RlcCfgCfmInfo *rlcCRsp)
{
uint8_t idx;
uint8_t ret = ROK;
*
******************************************************************/
-uint8_t fillRlcCfg(RlcCb *gCb, RlcCfgInfo *rlcUeCfg, RlcUeCfg *ueCfg)
+uint8_t fillRlcCfg(RlcCb *gCb, RlcCfgInfo *rlcUeCfg, RlcUeCreate *ueCfg)
{
uint8_t lcIdx;
* Functionality:
* Fill RlcCfgCfmInfo structure for sending failure response to DU
*
- * @params[in] RlcCfgCfmInfo *cfgRsp, RlcUeCfg *ueCfg
+ * @params[in] RlcCfgCfmInfo *cfgRsp, RlcUeCreate *ueCfg
*
* @return void
*
* ****************************************************************/
-void fillRlcCfgFailureRsp(RlcCfgCfmInfo *cfgRsp, RlcUeCfg *ueCfg)
+void fillRlcCfgFailureRsp(RlcCfgCfmInfo *cfgRsp, RlcUeCreate *ueCfg)
{
uint8_t cfgIdx =0;
* Functionality:
* Fill RlcCfgCfmInfo structure for sending failure response to DU
*
- * @params[in] RlcCfgCfmInfo *cfgRsp, RlcUeCfg *ueCfg
+ * @params[in] RlcCfgCfmInfo *cfgRsp, RlcUeCreate *ueCfg
*
* @return void
*
* Handles Ue create Request from DU APP
*
* @params[in] Post structure pointer
- * RlcUeCfg pointer
+ * RlcUeCreate pointer
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg)
+uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCreate *ueCfg)
{
uint8_t ret = ROK;
RlcCb *gCb;
DU_LOG("\nERROR --> RLC: Failed to fill configuration at RlcProcUeCreateReq()");
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_CREATE_RSP);
fillRlcCfgFailureRsp(&cfgRsp, ueCfg);
- SendRlcUeCfgRspToDu(&rspPst, &cfgRsp);
+ SendRlcUeCreateRspToDu(&rspPst, &cfgRsp);
}
else
DU_LOG("\nERROR --> RLC: Failed to configure Add/Mod/Del entities at RlcProcUeCreateReq()");
}
}
- RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueCfg, sizeof(RlcUeCfg));
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueCfg, sizeof(RlcUeCreate));
return ret;
}
RlcCb *rlcUeCb = NULLP;
RlcCfgCfmInfo cfgRsp;
Pst rspPst;
-
+
DU_LOG("\nDEBUG --> RLC: UE reconfig request received. CellID[%d] UEID[%d]",ueRecfg->cellId, ueRecfg->ueId);
rlcUeCb = RLC_GET_RLCCB(pst->dstInst);
DU_LOG("\nERROR --> RLC: Failed to fill configuration at RlcProcUeReconfigReq()");
FILL_PST_RLC_TO_DUAPP(rspPst, RLC_UL_INST, EVENT_RLC_UE_RECONFIG_RSP);
fillRlcRecfgFailureRsp(&cfgRsp, ueRecfg);
- SendRlcUeCfgRspToDu(&rspPst, &cfgRsp);
+ SendRlcUeReconfigRspToDu(&rspPst, &cfgRsp);
}
else
{
}
dir++;
}
-
+
sendSlicePmToDu(sliceStats);
return ROK;
}
+
+/*******************************************************************
+ *
+ * @brief sending UE reestablishment response to DU
+ *
+ * @details
+ *
+ * Function : sendRlcUeReestablishRspToDu
+ *
+ * Functionality:
+ * sending UE reestablishment response to DU
+ *
+ * @params[in] uint8_t cellId, uint8_t ueId, CauseOfResult status
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t sendRlcUeReestablishRspToDu(uint16_t cellId,uint8_t ueId, CauseOfResult status)
+{
+ Pst pst;
+ RlcUeReestablishRsp *ueReestablishRsp = NULLP;
+
+ FILL_PST_RLC_TO_DUAPP(pst, RLC_UL_INST, EVENT_RLC_UE_REESTABLISH_RSP);
+
+ RLC_ALLOC_SHRABL_BUF(pst.region, pst.pool, ueReestablishRsp, sizeof(RlcUeReestablishRsp));
+ if(!ueReestablishRsp)
+ {
+ DU_LOG("\nERROR --> RLC: sendRlcUeReestablishRspToDu(): Memory allocation failed ");
+ return RFAILED;
+ }
+ else
+ {
+ ueReestablishRsp->cellId = cellId;
+ ueReestablishRsp->ueId = ueId;
+ ueReestablishRsp->status = status;
+
+ if(rlcSendUeReestablishRspToDu(&pst, ueReestablishRsp) == ROK)
+ {
+ DU_LOG("\nDEBUG --> RLC: UE Reestablishment response send successfully");
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: SendRlcUeReestablishRspToDu():Failed to send UE Reestablishment response to DU");
+ RLC_FREE_SHRABL_BUF(pst.region, pst.pool, ueReestablishRsp, sizeof(RlcUeReestablishRsp));
+ return RFAILED;
+ }
+ }
+ return ROK;
+}
+
+/*******************************************************************
+*
+* @brief Handles Ue reestablishment Request from DU APP
+*
+* @details
+*
+* Function : RlcProcUeReestablishReq
+*
+* Functionality:
+* Handles Ue reestablishment Request from DU APP
+*
+* @params[in] Post structure pointer
+* RlcUeReestablishReq pointer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t RlcProcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueReestablishReq)
+{
+ uint8_t ret = RFAILED;
+ RlcCb *gRlcCb = NULLP;
+ RlcUlUeCb *ueCb = NULLP;
+ CauseOfResult status =SUCCESSFUL;
+
+ if(ueReestablishReq != NULLP)
+ {
+ gRlcCb = RLC_GET_RLCCB(pst->dstInst);
+ rlcDbmFetchUlUeCb(gRlcCb,ueReestablishReq->ueId, ueReestablishReq->cellId, &ueCb);
+ if(ueCb != NULLP)
+ {
+ if(ueReestablishReq->cellId == ueCb->cellId)
+ {
+ /* TODO :
+ * Step 1: Fill the RlcCfgInfo structure with data from the ueReestablishReq, just as we did in fillRlcCfg function and set
+ * ConfigType = CONFIG_REESTABLISH
+ * Step 2: To finish processing of Ue Reestablishment, call the RlcProcCfgReq function */
+ }
+ else
+ {
+ status = CELLID_INVALID;
+ DU_LOG("\nERROR --> SCH : RlcProcUeReestablishReq(): cell Id[%d] not found", ueReestablishReq->cellId);
+ }
+ }
+ else
+ {
+ status = UEID_INVALID;
+ DU_LOG("\nERROR --> SCH : RlcProcUeReestablishReq(): ue Id[%d] not found", ueReestablishReq->cellId);
+ }
+
+ if(status != SUCCESSFUL)
+ {
+ if(sendRlcUeReestablishRspToDu(ueReestablishReq->cellId, ueReestablishReq->ueId, status) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcUeReestablishReq():Failed to send UE Reestablishment response to DU");
+ }
+ }
+ RLC_FREE_SHRABL_BUF(pst->region, pst->pool, ueReestablishReq, sizeof(RlcUeDelete));
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: RlcProcUeReestablishReq(): Recieved NULL pointer UE Reestablishment ");
+ }
+ return ret;
+}
/**********************************************************************
- End of file
-**********************************************************************/
+ End of file
+ **********************************************************************/
ret = unpackRlcUeDeleteReq(RlcProcUeDeleteReq, pst, mBuf);
break;
}
+ case EVENT_RLC_UE_REESTABLISH_REQ:
+ {
+ ret = unpackRlcUeReestablishReq(RlcProcUeReestablishReq, pst, mBuf);
+ break;
+ }
case LKW_EVT_STS_REQ:
{
packRlcUlRrcMsgToDu /* 2 - Light weight loosely coupled */
};
+RlcDuMaxRetransInd rlcMaxRetransIndOpts[] =
+{
+ packRlcDuMaxRetransInd, /* 0 - loosely coupled */
+ DuProcRlcMaxRetransInd, /* 1 - tightly coupled */
+ packRlcDuMaxRetransInd /* 2 - LWLC loosely coupled */
+};
+
RlcRrcDeliveryReportToDuFunc rlcSendRrcDeliveryReportToDuOpts[]=
{
packRrcDeliveryReportToDu, /* 0 - Loosely coupled */
DuProcRlcSliceMetrics, /* 1 - tightly coupled */
packRlcDuSlicePm /* 2 - LWLC loosely coupled */
};
+
+RlcDuUeReestablishRsp rlcUeReestablishRspOpts[] =
+{
+ packRlcDuUeReestablishRsp, /* 0 - loosely coupled */
+ DuProcRlcUeReestablishRsp, /* 1 - tightly coupled */
+ packRlcDuUeReestablishRsp /* 2 - LWLC loosely coupled */
+};
+
/*******************************************************************
*
* @brief Sends UL RRC Message Info to DU APP
return (*rlcSendUlRrcMsgToDuOpts[pst->selector])(pst, ulRrcMsgInfo);
}
+/*******************************************************************
+*
+* @brief Sends max retransmission reached Info to DU APP
+*
+* @details
+*
+* Function : rlcSendMaxRetransIndToDu
+*
+* Functionality: Sends max retransmission reached Info to DU APP
+*
+* @params[in] Pst structure
+* max retransmission reached Info
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t rlcSendMaxRetransIndToDu(Pst *pst, RlcMaxRetransInfo *maxRetransInfo)
+{
+ return (*rlcMaxRetransIndOpts[pst->selector])(pst, maxRetransInfo);
+}
+
/*******************************************************************
*
* @brief Sends RRC delivery Message Info to DU APP
{
return (*rlcSlicePmOpts[pst->selector])(pst, sliceStats);
}
+
+/*******************************************************************
+ *
+ * @brief Sends Ue Reestablishment Rsp to DU APP
+ *
+ * @details
+ *
+ * Function : rlcSendUeReestablishRspToDu
+ *
+ * Functionality: Sends Ue Reestablishment Rsp to DU APP
+ *
+ * @params[in] Pst *pst, RlcUeReestablishRsp *ueReestablishRsp
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t rlcSendUeReestablishRspToDu(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp)
+{
+ return (*rlcUeReestablishRspOpts[pst->selector])(pst, ueReestablishRsp);
+}
+
/**********************************************************************
End of file
**********************************************************************/
################################################################################
*******************************************************************************/
+uint8_t rlcSendMaxRetransIndToDu(Pst *pst, RlcMaxRetransInfo *maxRetransInfo);
uint8_t rlcSendUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
uint8_t rlcSendRrcDeliveryReportToDu(Pst *pst, RrcDeliveryReport *rrcDelivery);
uint8_t rlcSendDlRrcMsgRspToDu(Pst *pst, RlcDlRrcMsgRsp *dlRrcMsgRsp);
uint8_t rlcSendUlUserDataToDu(Pst *pst, RlcUlUserDatInfo *ulUserData);
uint8_t rlcSendUeDeleteRspToDu(Pst *pst, RlcUeDeleteRsp *ueDeleteRsp);
uint8_t rlcSendSlicePmToDu(Pst *pst, SlicePmList *sliceStats);
+uint8_t rlcSendUeReestablishRspToDu(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp);
/**********************************************************************
End of file
**********************************************************************/
uint8_t indexTable = 0;
uint32_t freq = 0;
- for(indexTable = 0; indexTable < 4; indexTable++)
+ for(indexTable = 0; indexTable < 3; indexTable++)
{
if(arfcn <= arfcnFreqTable[indexTable][4])
{
- freq = arfcnFreqTable[indexTable][2] + (arfcnFreqTable[indexTable][1] * (arfcn - arfcnFreqTable[indexTable][3]));
- return (freq*1000);
+ freq = (arfcnFreqTable[indexTable][2] * 1000) + (arfcnFreqTable[indexTable][1] * (arfcn - arfcnFreqTable[indexTable][3]));
+ return (freq);
}
}
DU_LOG("ERROR --> DUAPP: ARFCN vaid range is between 0 and 3279165");
- return (freq*1000);
+ return (freq);
}
* 3GPP TS 38.104, Table 5.4.2.1-1
* Formula: NREF = NREF-Offs + (FREF – FREF-Offs) / ΔFGlobal
*
-* @params[in] uint32_t Freq(MHZ)
+* @params[in] uint32_t Freq(kHZ)
*
* @return [out] uint32_t ARFCN(number)
*
uint8_t indexTable = 0;
uint32_t arfcn = 0;
- for(indexTable = 0; indexTable < 4; indexTable++)
+ for(indexTable = 0; indexTable < 3; indexTable++)
{
if(freq < arfcnFreqTable[indexTable][0])
{
- arfcn = arfcnFreqTable[indexTable][3] + ((freq - arfcnFreqTable[indexTable][2]) / (arfcnFreqTable[indexTable][1]));
+ arfcn = arfcnFreqTable[indexTable][3] + ((freq - (arfcnFreqTable[indexTable][2] * 1000)) / (arfcnFreqTable[indexTable][1]));
return (arfcn);
}
}
CONFIG_UNKNOWN,
CONFIG_ADD,
CONFIG_MOD,
- CONFIG_DEL
+ CONFIG_DEL,
+ CONFIG_REESTABLISH
}ConfigType;
#ifdef NR_TDD
*
*
* @params[in] Post structure pointer
- * MacUeCfg pointer
+ * MacUeCreateReq pointer
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg)
+uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg)
{
Buffer *mBuf = NULLP;
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- MacUeCfg *ueCfg;
+ MacUeCreateReq *ueCfg;
/* unpack the address of the structure */
CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
/*******************************************************************
*
- * @brief Pack and send UE config response from MAC to DU APP
+ * @brief Pack and send UE create response from MAC to DU APP
*
* @details
*
- * Function : packDuMacUeCfgRsp
+ * Function : packDuMacUeCreateRsp
*
* Functionality:
- * Pack and send UE config response from MAC to DU APP
+ * Pack and send UE create response from MAC to DU APP
*
* @params[in]
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp)
+uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp)
{
Buffer *mBuf = NULLP;
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nERROR --> MAC : Memory allocation failed at packDuMacUeCfgRsp");
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packDuMacUeCreateRsp");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nERROR --> MAC: Only LWLC supported for packDuMacUeCfgRsp");
+ DU_LOG("\nERROR --> MAC: Only LWLC supported for packDuMacUeCreateRsp");
return RFAILED;
}
}
/*******************************************************************
*
- * @brief Unpack UE Config Response from MAC to DU APP
+ * @brief Unpack UE Create Response from MAC to DU APP
*
* @details
*
- * Function :unpackDuMacUeCfgRsp
+ * Function :unpackDuMacUeCreateRsp
*
- * Functionality: Unpack UE Config Response from MAC to DU APP
+ * Functionality: Unpack UE Create Response from MAC to DU APP
*
* @params[in]
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf)
+uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf)
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- MacUeCfgRsp *cfgRsp = NULLP;
+ MacUeCreateRsp *cfgRsp = NULLP;
/* unpack the address of the structure */
CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
*
*
* @params[in] Post structure pointer
- * MacUeCfg pointer
+ * MacUeRecfg pointer
* @return ROK - success
* RFAILED - failure
*
return RFAILED;
}
+/*******************************************************************
+*
+* @brief Packs and Sends Dl Broadcast Request from DUAPP to MAC
+*
+* @details
+*
+* Function : packDuMacDlBroadcastReq
+*
+* Functionality:
+* Packs and Sends Dl Broadcast Request from DUAPP to MAC
+*
+*
+* @params[in] Post structure pointer
+* MacDlBroadcastReq pointer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *ueDel)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> MAC : Memory allocation failed at packDuMacDlBroadcastReq");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueDel, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> MAC: Only LWLC supported for packDuMacDlBroadcastReq");
+ return RFAILED;
+ }
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks Dl Broadcast Request received from DU APP
+*
+* @details
+*
+* Function : unpackMacDlBroadcastReq
+*
+* Functionality:
+* Unpacks Dl Broadcast Request received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ MacDlBroadcastReq *dlBroadcast;
+
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&dlBroadcast, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, dlBroadcast);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> DU APP : Only LWLC supported for Dl Broadcast Request ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
+ return RFAILED;
+}
/*******************************************************************
*
* @brief Searches for first unset bit in ueBitMap
#define __MACINT_H__
#define NUM_NUMEROLOGY 5 /* Number of numerology */
-
+#define MAX_SI_MESSAGE 32 /* As per 138 331 V15.3, RRC Multiplicity and type constraint definitions maxSI-Message = 32 */
+#define NUM_SIB 32 /* As per 138 331 V15.3, RRC Multiplicity and type constraint definitions maxSIB = 32 */
#define NUM_SSB 1 /* max value is 64 */
#define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
#define SIB1_REPETITION_PERIOD 20
#define EVENT_MAC_UE_RESET_REQ 225
#define EVENT_MAC_UE_RESET_RSP 226
#define EVENT_MAC_UE_SYNC_STATUS_IND 227
+#define EVENT_MAC_DL_BROADCAST_REQ 228
#define BSR_PERIODIC_TIMER_SF_10 10
#define BSR_RETX_TIMER_SF_320 320
#define PAGING_SCHED_DELTA 4
#define MAX_PLMN 2
+typedef enum
+{
+ SIB_TYPE2,
+ SIB_TYPE3,
+ SIB_TYPE4,
+ SIB_TYPE5,
+ SIB_TYPE6,
+ SIB_TYPE7,
+ SIB_TYPE8,
+ SIB_TYPE9,
+ SPARE
+}SibType;
+
+typedef enum
+{
+ SSB_PER_RACH_OCCASION_ONE_EIGHTH,
+ SSB_PER_RACH_OCCASION_ONE_FOURTH,
+ SSB_PER_RACH_OCCASION_ONE_HALF,
+ SSB_PER_RACH_OCCASION_ONE,
+ SSB_PER_RACH_OCCASION_TWO,
+ SSB_PER_RACH_OCCASION_FOUR,
+ SSB_PER_RACH_OCCASION_EIGHT,
+ SSB_PER_RACH_OCCASION_SIXTEEN
+}SsbPerRachOccasion;
+
+typedef enum
+{
+ BROADCASTING,
+ NOTBROADCASTING,
+}SiBroadcastStatus;
+
+typedef enum
+{
+ RF8,
+ RF16,
+ RF32,
+ RF64,
+ RF128,
+ RF256,
+ RF512
+}SiPeriodicity;
+
+typedef enum
+{
+ S5,
+ S10,
+ S20,
+ S40,
+ S80,
+ S160,
+ S320,
+ S640,
+ S1280
+}SiWindowLength;
+
+typedef enum
+{
+ SI_REQ_PERIOD_1,
+ SI_REQ_PERIOD_2,
+ SI_REQ_PERIOD_4,
+ SI_REQ_PERIOD_6,
+ SI_REQ_PERIOD_8,
+ SI_REQ_PERIOD_10,
+ SI_REQ_PERIOD_12,
+ SI_REQ_PERIOD_16
+}SiRequestPeriod;
+
typedef enum
{
MAC_DU_APP_RSP_NOK,
McsTable mcsTable; /* MCS table */
}ModulationInfo;
-typedef struct macUeCfg
+typedef struct macUeCreateReq
{
uint16_t cellId;
uint8_t ueId;
ModulationInfo ulModInfo; /* UL modulation info */
uint8_t numLcs;
LcCfg lcCfgList[MAX_NUM_LC];
-}MacUeCfg;
+}MacUeCreateReq;
/* UE Re-configuration */
typedef struct macUeRecfg
FailureCause cause;
}SCellFailInfo;
-typedef struct ueCfgRsp
+typedef struct macUeCreateRsp
{
uint16_t cellId;
uint16_t ueId;
SCellFailInfo *failedSCellList;
uint8_t numDRBModFailed; /* valid values : 0 to MAX_NUM_DRB */
DRBFailInfo *failedDRBModlist;
-}MacUeCfgRsp;
+}MacUeCreateRsp;
-typedef struct ueCfgRsp MacUeRecfgRsp;
+typedef struct macUeCreateRsp MacUeRecfgRsp;
typedef struct rachRsrcReq
{
typedef struct macSliceCfgReq MacSliceRecfgReq;
typedef struct macSliceCfgRsp MacSliceRecfgRsp;
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.17 DL PCCH Indication */
typedef struct dlPcchInd
{
uint16_t cellId;
uint8_t *pcchPdu;
}DlPcchInd;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.1 Cell Start */
typedef struct cellInfo
{
SlotTimingInfo slotInfo;
typedef struct cellInfo CellStartInfo;
typedef struct cellInfo CellStopInfo;
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.12 UE Reset Request */
typedef struct ueReset
{
uint16_t cellId;
uint8_t ueId;
}MacUeResetReq;
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.13 UE Reset Response */
typedef struct ueResetRsp
{
uint16_t cellId;
CauseOfResult status;
}MacUeResetRsp;
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.14 UE Sync Status Indication */
typedef struct ueSyncStatusInd
{
uint16_t cellId;
SyncStatus status;
}MacUeSyncStatusInd;
+/* The following list of structures is taken from the SI-SchedulingInfo section of specification 33.331. */
+typedef struct sibTypeInfo
+{
+ SibType sibType;
+ uint8_t valueTag;
+ bool areaScope;
+}SibTypeInfo;
+
+typedef struct sibMappingInfo
+{
+ uint8_t numSibTypeInfo;
+ SibTypeInfo sibTypeInfo[NUM_SIB];
+}SibMappingInfo;
+
+typedef struct schedulingInfo
+{
+ SiBroadcastStatus siBroadcastStatus;
+ SiPeriodicity siPeriodicity;
+ SibMappingInfo sibMappingInfo;
+}SchedulingInfo;
+
+typedef struct rachOccasionsSi
+{
+ RachCfgGeneric rachConfigSi;
+ SsbPerRachOccasion ssbPerRachOccasion;
+}RachOccasionsSi;
+
+typedef struct siReqRsrc
+{
+ uint8_t raPreambleStartIndex;
+ uint8_t raAssociationPeriodIndex;
+ uint8_t raSsbOccasionMaskIndex;
+}SiReqRsrc;
+
+typedef struct siRequestResource
+{
+ uint8_t numOfSiReqRsrc;
+ SiReqRsrc siReqRsrc[MAX_SI_MESSAGE];
+}SiRequestResource;
+
+typedef struct siRequestConfig
+{
+ RachOccasionsSi rachOccasionsSi;
+ SiRequestPeriod siRequestPeriod;
+ SiRequestResource siRequestResource;
+}SiRequestConfig;
+
+typedef struct schedulingInfoList
+{
+ uint8_t numSchInfo;
+ SchedulingInfo schedulingInfo[MAX_SI_MESSAGE];
+}SchedulingInfoList;
+
+typedef struct siSchedulingInfo
+{
+ SchedulingInfoList schInfoList;
+ SiWindowLength siWindowLength;
+ SiRequestConfig siRequestConfig;
+ SiRequestConfig siRequestConfigSUL;
+ uint8_t *siAreaID;
+}SiSchedulingInfo;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.18 DL Broadcast Request */
+typedef struct macDlBroadcastReq
+{
+ uint16_t cellId;
+ uint8_t numSiBlock;
+ SiSchedulingInfo **siSchedulingInfo;
+}MacDlBroadcastReq;
+
+/* DL broadcast req from DU APP to MAC*/
+typedef uint8_t (*DuMacDlBroadcastReq) ARGS((
+ Pst *pst,
+ MacDlBroadcastReq *dlBroadcast));
+
/* Functions for CellUp Ind from MAC to DU APP*/
typedef uint8_t (*DuMacCellUpInd) ARGS((
Pst *pst,
/* UE create Request from DU APP to MAC*/
typedef uint8_t (*DuMacUeCreateReq) ARGS((
Pst *pst,
- MacUeCfg *ueCfg ));
+ MacUeCreateReq *ueCfg ));
/* UE create Response from MAC to DU APP */
-typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
+typedef uint8_t (*MacDuUeCreateRspFunc) ARGS((
Pst *pst,
- MacUeCfgRsp *cfgRsp));
+ MacUeCreateRsp *cfgRsp));
/* UE Reconfig Request from DU APP to MAC */
typedef uint8_t (*DuMacUeReconfigReq) ARGS((
uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
-uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
+uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
-uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
+uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
uint8_t sendStopIndMacToDuApp(uint16_t cellId);
-uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
-uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
-uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
+uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
+uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
+uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf);
+uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
+uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
+uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf);
#endif
#include "common_def.h"
#include "du_app_rlc_inf.h"
+/*******************************************************************
+*
+* @brief Packs and Sends Max Retransmission Reached Info from RLC to DUAPP
+*
+* @details
+*
+* Function : packRlcDuMaxRetransInd
+*
+* Functionality:
+* Packs and Sends Max Retransmission Reached Info from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+* RlcMaxRetransInfo *maxRetransInfo
+*
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuMaxRetransInd(Pst *pst, RlcMaxRetransInfo *maxRetransInfo)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuMaxRetransInd");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)maxRetransInfo, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuMaxRetransInd");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks Max Retransmission Reached Info received from DU APP
+*
+* @details
+*
+* Function : unpackRlcMaxRetransInd
+*
+* Functionality:
+* Unpacks Max Retransmission Reached Info received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcMaxRetransInd(RlcDuMaxRetransInd func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcMaxRetransInfo *maxRetransInfo = NULLP;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&maxRetransInfo, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, maxRetransInfo);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for Max Retransmission Reached Info ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
+ return RFAILED;
+}
+
/*******************************************************************
*
* @brief Packs and Sends UE create Request from DUAPP to RLC
*
*
* @params[in] Post structure pointer
- * RlcUeCfg pointer
+ * RlcUeCreate pointer
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg)
+uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCreate *ueCfg)
{
Buffer *mBuf = NULLP;
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- RlcUeCfg *ueCfg;
+ RlcUeCreate *ueCfg;
/* unpack the address of the structure */
CMCHKUNPK(oduUnpackPointer, (PTR *)&ueCfg, mBuf);
ODU_PUT_MSG_BUF(mBuf);
/*******************************************************************
*
- * @brief Packs and Sends UE Cfg Response from RLC to DUAPP
+ * @brief Packs and Sends UE Create Response from RLC to DUAPP
*
* @details
*
- * Function : packRlcDuUeCfgRsp
+ * Function : packRlcDuUeCreateRsp
*
* Functionality:
* Packs and Sends UE Cfg Rrsponse from RLC to DUAPP
* RFAILED - failure
*
* ****************************************************************/
-uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfg)
+uint8_t packRlcDuUeCreateRsp(Pst *pst, RlcUeCreateRsp *ueCfg)
{
Buffer *mBuf = NULLP;
{
if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
{
- DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeCfgRsp");
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeCreateRsp");
return RFAILED;
}
/* pack the address of the structure */
}
else
{
- DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeCfgRsp");
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeCreateRsp");
return RFAILED;
}
/*******************************************************************
*
- * @brief Unpacks UE Cfg Response received from DU APP
+ * @brief Unpacks UE Create Response received from DU APP
*
* @details
*
- * Function : unpackRlcUeCfgRsp
+ * Function : unpackRlcUeCreateRsp
*
* Functionality:
* Unpacks UE Cfg Response received from DU APP
* RFAILED - failure
*
* ****************************************************************/
-uint8_t unpackRlcUeCfgRsp(RlcDuUeCfgRsp func, Pst *pst, Buffer *mBuf)
+uint8_t unpackRlcUeCreateRsp(RlcDuUeCreateRsp func, Pst *pst, Buffer *mBuf)
{
if(pst->selector == ODU_SELECTOR_LWLC)
{
- RlcUeCfgRsp *cfgRsp = NULLP;
+ RlcUeCreateRsp *cfgRsp = NULLP;
/* unpack the address of the structure */
CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
ODU_PUT_MSG_BUF(mBuf);
return RFAILED;
}
+/*******************************************************************
+ *
+ * @brief Packs and Sends UE Reconfig Response from RLC to DUAPP
+ *
+ * @details
+ *
+ * Function : packRlcDuUeReconfigRsp
+ *
+ * Functionality:
+ * Packs and Sends UE Reconfig Rrsponse from RLC to DUAPP
+ *
+ *
+ * @params[in] Post structure pointer
+ * RlcUeRecfgRsp pointer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t packRlcDuUeReconfigRsp(Pst *pst, RlcUeReconfigRsp *ueCfg)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeReconfigRsp");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueCfg, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeReconfigRsp");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+ *
+ * @brief Unpacks UE Reconfig Response received from DU APP
+ *
+ * @details
+ *
+ * Function : unpackRlcUeReconfigRsp
+ *
+ * Functionality:
+ * Unpacks UE Reconfig Response received from DU APP
+ *
+ * @params[in] Pointer to Handler
+ * Post structure pointer
+ * Message Buffer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t unpackRlcUeReconfigRsp(RlcDuUeReconfigRsp func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUeReconfigRsp *cfgRsp = NULLP;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&cfgRsp, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, cfgRsp);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Re-Cfg Response ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
+ return RFAILED;
+}
+
/*******************************************************************
*
* @brief Pack and send UL RRC message transfer from RLC to DU APP
return RFAILED;
}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Reestablishment Req from DUAPP to RLC
+*
+* @details
+*
+* Function : packDuRlcUeReestablishReq
+*
+* Functionality:
+* Packs and Sends UE Reestablishment Req from DUAPP to RLC
+*
+*
+* @params[in] Post structure pointer
+* RlcUeReestablishReq pointer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packDuRlcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueDelete)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packDuRlcUeReestablishReq");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueDelete, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packDuRlcUeReestablishReq");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+* @brief Unpacks UE Reestablishment Req received from DU APP
+*
+* @details
+*
+* Function : unpackRlcUeReestablishReq
+*
+* Functionality:
+* Unpacks UE Reestablishment Req received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeReestablishReq(DuRlcUeReestablishReq func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUeReestablishReq *ueDelete;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueDelete, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, ueDelete);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Reestablishment Req ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+ return RFAILED;
+}
+
+/*******************************************************************
+*
+* @brief Packs and Sends UE Reestablishment Response from RLC to DUAPP
+*
+* @details
+*
+* Function : packRlcDuUeReestablishRsp
+*
+* Functionality:
+* Packs and Sends UE Reestablishment Response from RLC to DUAPP
+*
+*
+* @params[in] Post structure pointer
+* RlcUeReestablishRsp *ueReestablish
+*
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t packRlcDuUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablish)
+{
+ Buffer *mBuf = NULLP;
+
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK)
+ {
+ DU_LOG("\nERROR --> RLC : Memory allocation failed at packRlcDuUeReestablishRsp");
+ return RFAILED;
+ }
+ /* pack the address of the structure */
+ CMCHKPK(oduPackPointer,(PTR)ueReestablish, mBuf);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for packRlcDuUeReestablishRsp");
+ return RFAILED;
+ }
+
+ return ODU_POST_TASK(pst,mBuf);
+}
+
+/*******************************************************************
+*
+* @brief Unpacks UE Reestablishment Response received from DU APP
+*
+* @details
+*
+* Function : unpackRlcUeReestablishRsp
+*
+* Functionality:
+* Unpacks UE Reestablishment Response received from DU APP
+*
+* @params[in] Pointer to Handler
+* Post structure pointer
+* Message Buffer
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+
+uint8_t unpackRlcUeReestablishRsp(RlcDuUeReestablishRsp func, Pst *pst, Buffer *mBuf)
+{
+ if(pst->selector == ODU_SELECTOR_LWLC)
+ {
+ RlcUeReestablishRsp *ueReestablishRsp = NULLP;
+ /* unpack the address of the structure */
+ CMCHKUNPK(oduUnpackPointer, (PTR *)&ueReestablishRsp, mBuf);
+ ODU_PUT_MSG_BUF(mBuf);
+ return (*func)(pst, ueReestablishRsp);
+ }
+ else
+ {
+ /* Nothing to do for other selectors */
+ DU_LOG("\nERROR --> RLC: Only LWLC supported for UE Reestablishment Response ");
+ ODU_PUT_MSG_BUF(mBuf);
+ }
+
+ return RFAILED;
+}
/**********************************************************************
End of file
***********************************************************************/
#define EVENT_RLC_UE_DELETE_REQ 220
#define EVENT_RLC_UE_DELETE_RSP 221
#define EVENT_RLC_SLICE_PM_TO_DU 222
+#define EVENT_RLC_UE_REESTABLISH_REQ 223
+#define EVENT_RLC_UE_REESTABLISH_RSP 224
+#define EVENT_RLC_MAX_RETRANSMISSION 225
#define RB_ID_SRB 0
#define RB_ID_DRB 1
RLC_DU_APP_RSP_NOK
}RlcRsp;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.10 RLC Max Retransmission Reached */
+
+typedef struct rlcMaxRetransInd
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ RlcRbType lcType;
+ uint8_t lcId;
+}RlcMaxRetransInfo;
+
typedef struct ulAmCfg
{
SnLenAm snLenUl; /* Sequence Number length in bits. Allowed values are 12 and 18 */
bool isLcAddModRspSent;
}RlcBearerCfg;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.3 UE Reconfiguration */
typedef struct rlcUeRecfg
{
uint16_t cellId;
RlcBearerCfg rlcLcCfgRel[MAX_NUM_LC];
}RlcUeRecfg;
-typedef struct rlcUeCfg
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.1 UE Create */
+typedef struct rlcUeCreate
{
uint16_t cellId;
uint8_t ueId;
uint8_t numLcsToAdd;
RlcBearerCfg rlcLcCfgAdd[MAX_NUM_LC];
-}RlcUeCfg;
+}RlcUeCreate;
-typedef struct rlcUeCfgRsp
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.2 UE Create Response */
+typedef struct rlcUeCreateRsp
{
uint16_t cellId;
uint16_t ueId;
RlcRsp result;
FailureReason reason;
-}RlcUeCfgRsp;
+}RlcUeCreateRsp;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.4 UE Reconfig Response */
+typedef struct rlcUeCreateRsp RlcUeReconfigRsp;
+
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.5 UE Delete Response */
typedef struct rlcUeDelete
{
uint16_t cellId;
uint8_t ueId;
}RlcUeDelete;
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.6 UE Delete Response */
typedef struct rlcUeDeleteRsp
{
uint16_t cellId;
CauseOfResult status;
}RlcUeDeleteRsp;
-/* UL RRC Message from RLC to DU APP */
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.8 UL RRC Message Transfer*/
typedef struct ulRrcMsgInfo
{
uint16_t cellId; /* Cell Id */
uint8_t *rrcMsg; /* RRC Message (UL-DCCH Message) */
}RlcUlRrcMsgInfo;
-/* UL User Data from RLC to DU APP */
-typedef struct ulUserDatInfo
-{
- uint16_t cellId; /* Cell Id */
- uint16_t ueId; /* UE Id */
- uint8_t rbId;
- uint16_t msgLen; /* User data length (in bytes) */
- uint8_t *userData; /* User data (UL-DTCH Message) */
-}RlcUlUserDatInfo;
-
-/* DL RRC Message from DU APP to RLC */
+/* Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.7 DL RRC Message Transfer */
typedef struct dlRrcMsgInfo
{
uint16_t cellId; /* Cell Id */
uint8_t *rrcMsg; /* RRC Message (DL-DCCH Message) */
}RlcDlRrcMsgInfo;
-/* DL RRC Message Rsp From RLC to DU APP */
+/* UL User Data from RLC to DU APP */
+typedef struct ulUserDatInfo
+{
+ uint16_t cellId; /* Cell Id */
+ uint16_t ueId; /* UE Id */
+ uint8_t rbId;
+ uint16_t msgLen; /* User data length (in bytes) */
+ uint8_t *userData; /* User data (UL-DTCH Message) */
+}RlcUlUserDatInfo;
+
+/* DL RRC Message Rsp From RLC to DU APP */
typedef struct dlRrcMsgRsp
{
uint16_t cellId; /* Cell Id */
DlMsgState state; /* Dl RRC Msg State */
}RlcDlRrcMsgRsp;
-/* RRC delivery message from RLC to DU APP */
-typedef struct rrcDeliveryStatus
-{
- uint16_t deliveryStatus;
- uint16_t triggeringMessage;
-}RrcDeliveryStatus;
-
typedef struct
{
uint32_t sd:24;
SlicePm *sliceRecord;
}SlicePmList;
-typedef struct rrcDeliveryReportInfo
-{
- uint16_t cellId;
- uint16_t ueId;
- uint8_t srbId;
- RrcDeliveryStatus rrcDeliveryStatus;
-}RrcDeliveryReport;
-
/* DL Data Message from DU APP to RLC */
typedef struct dlDataMsgInfo
{
Buffer *dlMsg; /* DL Data */
}RlcDlUserDataInfo;
+/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.9 UL RRC Message Delivery Report */
+typedef struct rrcDeliveryStatus
+{
+ uint16_t deliveryStatus;
+ uint16_t triggeringMessage;
+}RrcDeliveryStatus;
+
+typedef struct rrcDeliveryReportInfo
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ uint8_t srbId;
+ RrcDeliveryStatus rrcDeliveryStatus;
+}RrcDeliveryReport;
+
+/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.11 UE RLC Re-establishment Req */
+
+typedef struct rlcUeReestablishReq
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ uint8_t numLcsToReestablish;
+ uint8_t lcToReestablish[MAX_NUM_LC];
+}RlcUeReestablishReq;
+
+/*Ref: ORAN_WG8.V7.0.0 Sec 11.2.5.12 UE RLC Re-establishment Rsp */
+typedef struct rlcUeReestablishRsp
+{
+ uint16_t cellId;
+ uint16_t ueId;
+ CauseOfResult status;
+}RlcUeReestablishRsp;
+
/* Function Pointers */
+
+/* Max Retransmission from RLC to DU APP*/
+typedef uint8_t (*RlcDuMaxRetransInd) ARGS((
+ Pst *pst,
+ RlcMaxRetransInfo *maxRetransInfo));
+
/* UE create Request from DU APP to RLC*/
typedef uint8_t (*DuRlcUeCreateReq) ARGS((
Pst *pst,
- RlcUeCfg *ueCfg ));
+ RlcUeCreate *ueCfg ));
-/* UE Cfg Response from RLC to DU APP*/
-typedef uint8_t (*RlcDuUeCfgRsp) ARGS((
+/* UE Create Response from RLC to DU APP*/
+typedef uint8_t (*RlcDuUeCreateRsp) ARGS((
Pst *pst,
- RlcUeCfgRsp *ueCfgRsp));
+ RlcUeCreateRsp *ueCreateRsp));
/* UE Delete Response from RLC to DU APP*/
typedef uint8_t (*RlcDuUeDeleteRsp) ARGS((
Pst *pst,
RlcUeRecfg *ueRecfg ));
+/* UE Reconfig Response from RLC to DU APP*/
+typedef uint8_t (*RlcDuUeReconfigRsp) ARGS((
+ Pst *pst,
+ RlcUeReconfigRsp *ueReconfigRsp));
+
/* UE Delete Request from DU APP to RLC */
typedef uint8_t (*DuRlcUeDeleteReq) ARGS((
Pst *pst,
Pst *pst,
SlicePmList *sliceStats));
+/* UE Re-establishment Request from DU APP to RLC */
+typedef uint8_t (*DuRlcUeReestablishReq) ARGS((
+ Pst *pst,
+ RlcUeReestablishReq *ueReestablishReq));
+
+/* UE Re-establishment Response from RLC to DU APP*/
+typedef uint8_t (*RlcDuUeReestablishRsp) ARGS((
+ Pst *pst,
+ RlcUeReestablishRsp *ueDelRsp));
+
/* Pack/Unpack function declarations */
-uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
+uint8_t packRlcDuMaxRetransInd(Pst *pst, RlcMaxRetransInfo *maxRetransInd);
+uint8_t unpackRlcMaxRetransInd(RlcDuMaxRetransInd func, Pst *pst, Buffer *mBuf);
+uint8_t packDuRlcUeCreateReq(Pst *pst, RlcUeCreate *ueCfg);
uint8_t unpackRlcUeCreateReq(DuRlcUeCreateReq func, Pst *pst, Buffer *mBuf);
-uint8_t packRlcDuUeCfgRsp(Pst *pst, RlcUeCfgRsp *ueCfgRsp);
-uint8_t unpackRlcUeCfgRsp(RlcDuUeCfgRsp func, Pst *pst, Buffer *mBuf);
+uint8_t packRlcDuUeCreateRsp(Pst *pst, RlcUeCreateRsp *ueCfgRsp);
+uint8_t unpackRlcUeCreateRsp(RlcDuUeCreateRsp func, Pst *pst, Buffer *mBuf);
+uint8_t packRlcDuUeReconfigRsp(Pst *pst, RlcUeReconfigRsp *ueCfgRsp);
+uint8_t unpackRlcUeReconfigRsp(RlcDuUeReconfigRsp func, Pst *pst, Buffer *mBuf);
uint8_t packRlcUlRrcMsgToDu(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
uint8_t unpackRlcUlRrcMsgToDu(RlcUlRrcMsgToDuFunc func, Pst *pst, Buffer *mBuf);
uint8_t packDlRrcMsgToRlc(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo);
uint8_t unpackRlcUeDeleteRsp(RlcDuUeDeleteRsp func, Pst *pst, Buffer *mBuf);
uint8_t packRlcDuSlicePm(Pst *pst, SlicePmList *sliceStats);
uint8_t unpackRlcSlicePm(RlcSlicePmToDuFunc func, Pst *pst, Buffer *mBuf);
+uint8_t packDuRlcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueReestablish);
+uint8_t unpackRlcUeReestablishReq(DuRlcUeReestablishReq func, Pst *pst, Buffer *mBuf);
+uint8_t packRlcDuUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp);
+uint8_t unpackRlcUeReestablishRsp(RlcDuUeReestablishRsp func, Pst *pst, Buffer *mBuf);
/* Event Handler function declarations */
-uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCfg *ueCfg);
-uint8_t DuProcRlcUeCfgRsp(Pst *pst, RlcUeCfgRsp *cfgRsp);
+uint8_t DuProcRlcMaxRetransInd(Pst *pst, RlcMaxRetransInfo *maxRetransInd);
+uint8_t RlcProcUeCreateReq(Pst *pst, RlcUeCreate *ueCfg);
+uint8_t DuProcRlcUeCreateRsp(Pst *pst, RlcUeCreateRsp *cfgRsp);
+uint8_t DuProcRlcUeReconfigRsp(Pst *pst, RlcUeReconfigRsp *recfgRsp);
uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo);
uint8_t RlcProcDlRrcMsgTransfer(Pst *pst, RlcDlRrcMsgInfo *dlRrcMsgInfo);
uint8_t DuProcRlcRrcDeliveryReport(Pst *pst, RrcDeliveryReport *rrcDeliveryReport);
uint8_t RlcProcUeDeleteReq(Pst *pst, RlcUeDelete *ueDelete);
uint8_t DuProcRlcUeDeleteRsp(Pst *pst, RlcUeDeleteRsp *delRsp);
uint8_t DuProcRlcSliceMetrics(Pst *pst, SlicePmList *sliceStats);
+uint8_t RlcProcUeReestablishReq(Pst *pst, RlcUeReestablishReq *ueReestablish);
+uint8_t DuProcRlcUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *delRsp);
#endif /* RLC_INF_H */
/**********************************************************************
packDuMacDlPcchInd /* Light weight-loose coupling */
};
+DuMacDlBroadcastReq packMacDlBroadcastReqOpts[] =
+{
+ packDuMacDlBroadcastReq, /* Loose coupling */
+ MacProcDlBroadcastReq, /* TIght coupling */
+ packDuMacDlBroadcastReq /* Light weight-loose coupling */
+};
/*******************************************************************
*
* @brief Processes cells to be activated
return ROK;
}
+
+/*******************************************************************
+ *
+ * @brief DU build and send dl broacast req and send it to MAC
+ *
+ * @details
+ *
+ * Function : duBuildAndSendDlBroadcastReq
+ *
+ * Functionality: DU build and send dl broacast req and send to MAC
+ *
+ *
+ * @params[in] cellId, crnti
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t duBuildAndSendDlBroadcastReq()
+{
+ Pst pst;
+ uint8_t ret =ROK;
+ MacDlBroadcastReq *dlBroadcast=NULLP;
+
+ DU_LOG("\nDEBUG --> DU_APP : Building Dl broadcast request");
+
+ DU_ALLOC_SHRABL_BUF(dlBroadcast, sizeof(MacDlBroadcastReq));
+ if(dlBroadcast)
+ {
+ /*TODO - fill MAC DL Broadcast Request*/
+
+ FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_DL_BROADCAST_REQ);
+
+ DU_LOG("\nDEBUG --> DU_APP: Sending Dl broadcast Request to MAC ");
+ ret = (*packMacDlBroadcastReqOpts[pst.selector])(&pst, dlBroadcast);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU_APP: sendDlBroadcastReqToMac(): Failed to send Dl broadcast Req to MAC");
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, dlBroadcast, sizeof(MacDlBroadcastReq));
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: sendDlBroadcastReqToMac(): Failed to allocate memory");
+ ret = RFAILED;
+ }
+
+ return ret;
+}
+
/**********************************************************************
End of file
**********************************************************************/
*
* @params[in] DRBs_ToBeSetup_Item_t , DRBs_ToBeSetupMod_Item_t,
* DRBs_ToBeModified_Item_t , lcId, DuLcCfg pointer,
- * RlcBearerCfg , UpTnlCfg, RlcUeCfg
+ * RlcBearerCfg , UpTnlCfg, DuRlcUeCfg
* @return void
*
* ****************************************************************/
DU_LOG("\nERROR --> DU_APP : Invalid IE received in F1SetupRsp:%ld",
f1SetRspMsg->protocolIEs.list.array[idx]->id);
}
- duProcF1SetupRsp();
}
+ duProcF1SetupRsp();
freeAperDecodeF1SetupRsp(f1SetRspMsg);
duCb.f1SetupReqAndRspMsg.f1MsgRspBufSize = recvBufLen;
}
case EVENT_RLC_UE_CREATE_RSP:
{
- ret = unpackRlcUeCfgRsp(DuProcRlcUeCfgRsp, pst, mBuf);
+ ret = unpackRlcUeCreateRsp(DuProcRlcUeCreateRsp, pst, mBuf);
break;
}
case EVENT_RLC_UE_RECONFIG_RSP:
{
- ret = unpackRlcUeCfgRsp(DuProcRlcUeCfgRsp, pst, mBuf);
+ ret = unpackRlcUeReconfigRsp(DuProcRlcUeReconfigRsp, pst, mBuf);
break;
}
case EVENT_RLC_UE_DELETE_RSP:
ret = unpackRlcDlRrcMsgRspToDu(DuProcRlcDlRrcMsgRsp, pst, mBuf);
break;
}
+ case EVENT_RLC_MAX_RETRANSMISSION:
+ {
+ ret = unpackRlcMaxRetransInd(DuProcRlcMaxRetransInd, pst, mBuf);
+ break;
+ }
case EVENT_UL_USER_DATA_TRANS_TO_DU:
{
ret = unpackRlcUlUserDataToDu(DuProcRlcUlUserDataTrans, pst, mBuf);
ret = unpackRlcSlicePm(DuProcRlcSliceMetrics, pst, mBuf);
break;
}
+ case EVENT_RLC_UE_REESTABLISH_RSP:
+ {
+ ret = unpackRlcUeReestablishRsp(DuProcRlcUeReestablishRsp, pst, mBuf);
+ break;
+ }
default:
{
DU_LOG("\nERROR --> DU_APP : Invalid event %d received at duActvTsk from ENTRLC", \
}
case EVENT_MAC_UE_CREATE_RSP:
{
- ret = unpackDuMacUeCfgRsp(DuProcMacUeCfgRsp, pst, mBuf);
+ ret = unpackDuMacUeCreateRsp(DuProcMacUeCreateRsp, pst, mBuf);
break;
}
case EVENT_MAC_UE_RECONFIG_RSP:
#include "CmInterface.h"
#endif
+DuRlcUeReestablishReq packRlcUeReestablishReqOpts[] =
+{
+ packDuRlcUeReestablishReq, /* Loose coupling */
+ RlcProcUeReestablishReq, /* TIght coupling */
+ packDuRlcUeReestablishReq /* Light weight-loose coupling */
+};
+
DuMacDlCcchInd packMacDlCcchIndOpts[] =
{
packMacDlCcchInd, /* Loose coupling */
MacProcUeResetReq, /* TIght coupling */
packDuMacUeResetReq /* Light weight-loose coupling */
};
+
+/*******************************************************************
+ *
+ * @brief Processes UE's max retransmission information received from RLC
+ *
+ * @details
+ *
+ * Function : DuProcRlcMaxRetransInd
+ *
+ * Functionality:
+ * Processes max retransmission reached information received from RLC
+ *
+ * @params[in] Post structure
+ * Pointer to RlcMaxRetransInfo
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * *****************************************************************/
+
+uint8_t DuProcRlcMaxRetransInd(Pst *pst, RlcMaxRetransInfo *maxRetransInfo)
+{
+ uint8_t ueId = 0, ret = RFAILED;
+ uint16_t cellIdx = 0,crnti=0;
+
+ if(maxRetransInfo)
+ {
+ GET_CELL_IDX(maxRetransInfo->cellId, cellIdx);
+
+ if(duCb.actvCellLst[cellIdx]!=NULLP)
+ {
+ ueId = maxRetransInfo->ueId;
+ GET_CRNTI(crnti, ueId);
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueId-1].crnti == crnti)
+ {
+ /*TODO: complete the processing of max retransmission */
+ ret = ROK;
+ }
+ else
+ DU_LOG("\nERROR --> DU APP : DuProcRlcMaxRetransInd(): CRNTI [%d] not found", crnti);
+ }
+ else
+ DU_LOG("\nERROR --> DU APP : DuProcRlcMaxRetransInd(): Cell Id[%d] is not found", maxRetransInfo->cellId);
+
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, maxRetransInfo, sizeof(RlcMaxRetransInfo));
+
+ }
+ return ret;
+}
+
/******************************************************************
*
* @brief Function to return Drb LcId
* Functionality:
* Processes UE Reconfig Req to RLC UL
*
- * @params[in] Pointer to RlcUeCfg
+ * @params[in] Pointer to RlcUeRecfg
* @return ROK - success
* RFAILED - failure
*
}
else
{
- DU_LOG("\nERROR --> DU_APP: Received RlcUeCfg is NULL at sendUeRecfgReqToRlc()");
+ DU_LOG("\nERROR --> DU_APP: Received RlcUeRecfg is NULL at sendUeRecfgReqToRlc()");
ret = RFAILED;
}
return ret;
/**********************************************************************************
*
- * @brief Fills Ue Cfg from DU DB to MacUeCfg
+ * @brief Fills Ue Cfg from DU DB to MacUeCreateReq
*
* @details
*
* Functionality: fills ue Cfg to be sent to MAC
*
* @params[in] DuMacUeCfg Pointer
- * MacUeCfg Pointer
+ * MacUeCreateReq Pointer
*
* @return ROK - success
* RFAILED - failure
* *******************************************************************************/
-void fillMacUeCfg(DuMacUeCfg *duMacUeCfg, MacUeCfg *macUeCfg)
+void fillMacUeCfg(DuMacUeCfg *duMacUeCfg, MacUeCreateReq *macUeCfg)
{
uint8_t lcIdx = 0;
* Functionality: fills ue Cfg to be sent to RLC
*
* @params[in] DuRlcUeCfg Pointer
- * RlcUeCfg Pointer
+ * RlcUeCreate Pointer
*
* @return ROK - success
* RFAILED - failure
* *******************************************************************************/
-void fillRlcUeCfg(DuRlcUeCfg *duRlcUeCfg, RlcUeCfg *rlcUeCfg)
+void fillRlcUeCfg(DuRlcUeCfg *duRlcUeCfg, RlcUeCreate *rlcUeCfg)
{
uint8_t lcIdx = 0;
uint8_t duBuildAndSendUeCreateReqToMac(uint16_t cellId, uint8_t gnbDuUeF1apId, uint16_t crnti, DuUeCfg *ueCfgDb, DuMacUeCfg *duMacUeCfg)
{
uint8_t ret = ROK;
- MacUeCfg *macUeCfg = NULLP;
+ MacUeCreateReq *macUeCfg = NULLP;
Pst pst;
memset(&pst, 0, sizeof(Pst));
FILL_PST_DUAPP_TO_MAC(pst, EVENT_MAC_UE_CREATE_REQ);
/* Copying ueCb to a sharable buffer */
- DU_ALLOC_SHRABL_BUF(macUeCfg, sizeof(MacUeCfg));
+ DU_ALLOC_SHRABL_BUF(macUeCfg, sizeof(MacUeCreateReq));
if(macUeCfg)
{
- memset(macUeCfg, 0, sizeof(MacUeCfg));
+ memset(macUeCfg, 0, sizeof(MacUeCreateReq));
fillMacUeCfg(duMacUeCfg, macUeCfg);
DU_LOG("\nDEBUG --> DU_APP: Sending UE create request to MAC");
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU_APP : Failure in sending Ue Create Req to MAC at duBuildAndSendUeCreateReqToMac()");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, macUeCfg, sizeof(MacUeCfg));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, macUeCfg, sizeof(MacUeCreateReq));
}
}
else
/*******************************************************************
*
- * @brief Handle UE config response from MAC
+ * @brief Handle UE create response from MAC
*
* @details
*
- * Function : DuProcMacUeCfgRsp
+ * Function : DuProcMacUeCreateRsp
*
- * Functionality: Handle UE Config response from MAC
+ * Functionality: Handle UE Create response from MAC
*
- * @params[in] Pointer to MacUeCfgRsp and Pst
+ * @params[in] Pointer to MacUeCreateRsp and Pst
* @return ROK - success
* RFAILED - failure
*
* ****************************************************************/
-uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp)
+uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp)
{
uint8_t ret = ROK;
uint16_t cellIdx;
if((duBuildAndSendRachRsrcReqToMac(cfgRsp->cellId, cfgRsp->ueId)) != ROK)
{
DU_LOG("\nERROR --> DU APP : Failed to send RACH Resource Request to MAC");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacUeCreateRsp));
return RFAILED;
}
}
else
{
DU_LOG("\nERROR -> DU APP : Failure in updating DU UE CB");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacUeCreateRsp));
return RFAILED;
}
}
DU_LOG("\nERROR --> DU APP : MAC UE CFG Response for EVENT[%d]: FAILURE [DU UE F1AP ID : %d]", pst->event, cfgRsp->ueId);
ret = RFAILED;
}
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacUeCreateRsp));
}
else
{
- DU_LOG("\nERROR --> DU APP : Received MAC Ue Config Response is NULL at DuProcMacUeCfgRsp()");
+ DU_LOG("\nERROR --> DU APP : Received MAC Ue Config Response is NULL at DuProcMacUeCreateRsp()");
ret = RFAILED;
}
return ret;
*
* @params[in] cellId,
* ueId,
- * Pointer to RlcUeCfg
+ * Pointer to RlcUeCreate
* @return ROK - success
* RFAILED - failure
*
uint8_t duBuildAndSendUeCreateReqToRlc(uint16_t cellId, uint8_t gnbDuUeF1apId, DuUeCfg *ueCfgDb, DuRlcUeCfg *duRlcUeCfg)
{
uint8_t ret = ROK;
- RlcUeCfg *rlcUeCfg = NULLP;
+ RlcUeCreate *rlcUeCfg = NULLP;
Pst pst;
ret = updateRlcUeCfg(cellId, gnbDuUeF1apId, ueCfgDb, duRlcUeCfg);
FILL_PST_DUAPP_TO_RLC(pst, RLC_UL_INST, EVENT_RLC_UE_CREATE_REQ);
/* Copying ueCfg to a sharable buffer */
- DU_ALLOC_SHRABL_BUF(rlcUeCfg, sizeof(RlcUeCfg));
+ DU_ALLOC_SHRABL_BUF(rlcUeCfg, sizeof(RlcUeCreate));
if(rlcUeCfg)
{
- memset(rlcUeCfg, 0, sizeof(RlcUeCfg));
+ memset(rlcUeCfg, 0, sizeof(RlcUeCreate));
fillRlcUeCfg(duRlcUeCfg, rlcUeCfg);
/* Processing one Ue at a time to RLC */
if(ret == RFAILED)
{
DU_LOG("\nERROR --> DU_APP : Failure in sending Ue Create Req to RLC");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rlcUeCfg, sizeof(RlcUeCfg));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, rlcUeCfg, sizeof(RlcUeCreate));
ret = RFAILED;
}
}
* @details
*
- * Function : DuProcRlcUeCfgRsp
+ * Function : DuProcRlcUeCreateRsp
*
* Functionality:
* Processes UE create Rsp received from RLC UL
* RFAILED - failure
*
*****************************************************************/
-uint8_t DuProcRlcUeCfgRsp(Pst *pst, RlcUeCfgRsp *cfgRsp)
+uint8_t DuProcRlcUeCreateRsp(Pst *pst, RlcUeCreateRsp *cfgRsp)
{
uint8_t ret = ROK;
if((duBuildAndSendRachRsrcReqToMac(cfgRsp->cellId, cfgRsp->ueId)) != ROK)
{
DU_LOG("\nERROR --> DU APP : Failed to send RACH Resource Request to MAC");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(MacUeCfgRsp));
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCreateRsp));
return RFAILED;
}
}
else
{
DU_LOG("\nERROR --> DU APP : Failure in updating DU UE CB");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCreateRsp));
return RFAILED;
}
}
}
- else if(pst->event == EVENT_RLC_UE_RECONFIG_RSP)
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: RLC UE CREATE Response for EVENT[%d] : FAILED [UE IDX : %d, REASON :%d]",\
+ pst->event, cfgRsp->ueId, cfgRsp->reason);
+ ret = RFAILED;
+ }
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCreateRsp));
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: Received RLC Ue Create Response is NULL at DuProcRlcUeCreateRsp()");
+ ret = RFAILED;
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes UE reconfig Rsp received from RLC UL
+ *
+ * @details
+ *
+
+ * Function : DuProcRlcUeReconfigRsp
+ *
+ * Functionality:
+ * Processes UE reconfig Rsp received from RLC UL
+ *
+ * @params[in] Post structure
+ * Pointer to RlcCfgCfm
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ *****************************************************************/
+uint8_t DuProcRlcUeReconfigRsp(Pst *pst, RlcUeReconfigRsp *cfgRsp)
+{
+ uint8_t ret = ROK;
+
+ if(cfgRsp)
+ {
+ if(cfgRsp->result == RLC_DU_APP_RSP_OK)
+ {
+ if(pst->event == EVENT_RLC_UE_RECONFIG_RSP)
{
DU_LOG("\nINFO --> DU_APP: RLC UE Reconfig Response : SUCCESS [UE IDX:%d]", cfgRsp->ueId);
if((BuildAndSendUeCtxtRsp(cfgRsp->cellId, cfgRsp->ueId)) != ROK)
{
DU_LOG("\nERROR --> DU APP : Failure in BuildAndSendUeCtxtRsp");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeReconfigRsp));
return RFAILED;
}
}
else
{
DU_LOG("\nERROR --> DU APP : Failure in updating DU UE CB");
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeReconfigRsp));
return RFAILED;
}
}
}
else
{
- DU_LOG("\nERROR --> DU_APP: RLC UE CFG Response for EVENT[%d] : FAILED [UE IDX : %d, REASON :%d]",\
+ DU_LOG("\nERROR --> DU_APP: RLC UE RE-CFG Response for EVENT[%d] : FAILED [UE IDX : %d, REASON :%d]",\
pst->event, cfgRsp->ueId, cfgRsp->reason);
if((pst->event == EVENT_RLC_UE_RECONFIG_RSP))
{
}
ret = RFAILED;
}
- DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeCfgRsp));
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cfgRsp, sizeof(RlcUeReconfigRsp));
}
else
{
- DU_LOG("\nERROR --> DU_APP: Received RLC Ue Config Response is NULL at DuProcRlcUeCfgRsp()");
+ DU_LOG("\nERROR --> DU_APP: Received RLC Ue ReConfig Response is NULL at DuProcRlcUeReconfigRsp()");
ret = RFAILED;
}
return ret;
}
-
/**********************************************************************************
*
* @brief Fills Ue ReCfg from DU DB to RlcUeRecfg
*
* @params[in] cellId, crnti
* DuUeCfg *ueCfgDb
- * RlcUeCfg *rlcUeCfg
+ * RlcUeCreate *rlcUeCfg
* @return ROK - success
* RFAILED - failure
*
/*******************************************************************
*
- * @brief delete RlcUeCfg from duCb
+ * @brief delete RlcUeCreate from duCb
*
* @details
*
* Function : deleteRlcUeCfg
*
* Functionality:
- * delete RlcUeCfg from duCb
+ * delete RlcUeCreate from duCb
*
- * @params[in] RlcUeCfg *ueCfg
+ * @params[in] RlcUeCreate *ueCfg
*
* @return ROK - success
* RFAILED - failure
}
DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->snssai, sizeof(Snssai));
}
- memset(ueCfg, 0, sizeof(RlcUeCfg));
+ memset(ueCfg, 0, sizeof(DuRlcUeCfg));
}
}
}
return ret;
}
+
+/*******************************************************************
+ *
+ * @brief Sending UE Reestablishment Req To Rlc
+ *
+ * @details
+ *
+ * Function : sendUeReestablishReqToRlc
+ *
+ * Functionality:
+ * Sending UE Reestablishment Req To Rlc
+ *
+ * @params[in] cellId, ueId
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ *****************************************************************/
+
+uint8_t sendUeReestablishReqToRlc(uint16_t cellId, uint8_t ueId, uint8_t numLcToReestablish, uint8_t *lcId)
+{
+ uint8_t ret=ROK,idx=0;
+ Pst pst;
+ RlcUeReestablishReq *ueReestablish;
+
+ DU_ALLOC_SHRABL_BUF(ueReestablish, sizeof(RlcUeReestablishReq));
+ if(ueReestablish !=NULLP)
+ {
+ ueReestablish->cellId = cellId;
+ ueReestablish->ueId = ueId;
+ ueReestablish->numLcsToReestablish = numLcToReestablish;
+
+ for(idx = 0;idx<numLcToReestablish; idx++)
+ {
+ ueReestablish->lcToReestablish[idx]= lcId[idx];
+ }
+ FILL_PST_DUAPP_TO_RLC(pst, RLC_UL_INST, EVENT_RLC_UE_REESTABLISH_REQ);
+
+ ret = (*packRlcUeReestablishReqOpts[pst.selector])(&pst, ueReestablish);
+ if(ret == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU_APP : sendUeReestablishReqToRlc():Failed to send UE Reestablishment Req to RLC");
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, ueReestablish, sizeof(RlcUeReestablishReq));
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: sendUeReestablishReqToRlc():Memory allocation failed");
+ ret = RFAILED;
+ }
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief DU processes UE reestablishment req and sends to MAC and RLC
+ *
+ * @details
+ *
+ * Function : duBuildAndSendUeReestablishReq
+ *
+ * Functionality: DU processes UE reestablishment req and sends to MAC
+ * and RLC
+ *
+ * @params[in] cellId, crnti, numLcToReestablish, ListOflcid
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+
+uint8_t duBuildAndSendUeReestablishReq(uint16_t cellId, uint16_t crnti, uint8_t numLcToReestablish, uint8_t *lcId)
+{
+ uint8_t ueId =0;
+ uint16_t cellIdx = 0;
+
+ DU_LOG("\nDEBUG --> DU_APP: Building UE Reestablishment Request ");
+ GET_CELL_IDX(cellId, cellIdx);
+ GET_UE_ID(crnti, ueId);
+
+ if(duCb.actvCellLst[cellIdx] != NULLP)
+ {
+ if(crnti != duCb.actvCellLst[cellIdx]->ueCb[ueId - 1].crnti)
+ {
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishReq(): CRNTI [%d] not found", crnti);
+ return RFAILED;
+ }
+
+ if(sendUeReestablishReqToRlc(cellId, ueId, numLcToReestablish, lcId) == RFAILED)
+ {
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishReq(): Failed to send UE reestablishment req for RLC ");
+ return RFAILED;
+ }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishReq(): Cell Id %d is not found", cellId);
+ return RFAILED;
+ }
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Processes UE Reestablishment Rsp received from RLC
+ *
+ * @details
+ *
+ * Function : DuProcRlcUeReestablishRsp
+ *
+ * Functionality:
+ * Processes UE Reestablishment Rsp received from RLC
+ *
+ * @params[in] Post structure
+ * Pointer to RlcUeReestablishRsp
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * *****************************************************************/
+
+uint8_t DuProcRlcUeReestablishRsp(Pst *pst, RlcUeReestablishRsp *ueReestablishRsp)
+{
+ uint8_t ueId = 0, ret = RFAILED;
+ uint16_t cellIdx = 0,crnti=0;
+
+ if(ueReestablishRsp)
+ {
+ ueId = ueReestablishRsp->ueId;
+ GET_CELL_IDX(ueReestablishRsp->cellId, cellIdx);
+
+ if(ueReestablishRsp->status == SUCCESSFUL)
+ {
+ if(duCb.actvCellLst[cellIdx]!=NULLP)
+ {
+ GET_CRNTI(crnti, ueId);
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueId-1].crnti == crnti)
+ {
+ /*TODO: complete the processing of UE Reestablishment Response */
+ DU_LOG("\nINFO --> DU_APP: RLC UE Reestablishment Response : SUCCESS [UE IDX:%d]", ueId);
+ ret = ROK;
+ }
+ else
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishRsp(): CRNTI [%d] not found", crnti);
+ }
+ else
+ DU_LOG("\nERROR --> DU APP : duBuildAndSendUeReestablishRsp(): Cell Id[%d] is not found", ueReestablishRsp->cellId);
+
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DU_APP: RLC UE Reestablishment Response : FAILED [UE IDX:%d]", ueId);
+ }
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, ueReestablishRsp, sizeof(RlcUeReestablishRsp));
+
+ }
+ return ret;
+}
/**********************************************************************
End of file
***********************************************************************/