+
+ if(duGetCellCb(cellId->cellId, &cellCb) != ROK)
+ return RFAILED;
+
+ if((cellCb->cellStatus == ACTIVATED))
+ {
+ DU_LOG("\nINFO --> DU APP : 5G-NR Cell %d is DOWN", cellId->cellId);
+ cellCb->cellStatus = DELETION_IN_PROGRESS;
+
+#ifdef O1_ENABLE
+ DU_LOG("\nINFO --> DU APP : Raise cell down alarm for cell id=%d", cellId->cellId);
+ raiseCellAlrm(CELL_DOWN_ALARM_ID, cellId->cellId);
+#endif
+ }
+
+ if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
+ DU_FREE_SHRABL_BUF(MAC_MEM_REGION, pst->pool, cellId, sizeof(OduCellId));
+
+ cellCb->cellStatus = CELL_OUT_OF_SERVICE; //TODO: cell status must be set to OOS after all UE and cell cleanup which is not
+ //supported now
+
+ return ROK;
+}
+
+/*******************************************************************
+ *
+ * @brief Handles slot indication from MAC
+ *
+ * @details
+ *
+ * Function : duHandleUlCcchInd
+ *
+ * Functionality:
+ * Handles UL CCCH indication from MAC
+ *
+ * @params[in] Post structure pointer
+ * UL CCCH Ind pointer
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo)
+{
+
+ DU_LOG("\nINFO --> DU APP : UL CCCH Indication received");
+
+ return (duProcUlCcchInd(ulCcchIndInfo));
+}
+
+/*******************************************************************
+ *
+ * @brief Process UL RRC Message from RLC
+ *
+ * @details
+ *
+ * Function : DuProcRlcUlRrcMsgTrans
+ *
+ * Functionality: Process UL RRC Message from RLC
+ *
+ * @params[in] Post structure
+ * UL RRC Message Info
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
+{
+ DuCellCb *cellCb = NULLP;
+ DuUeCb ueCb ={0};
+
+ if(duGetCellCb(ulRrcMsgInfo->cellId, &cellCb) != ROK)
+ return RFAILED;
+ if(ulRrcMsgInfo->ueIdx > 0)
+ {
+ ueCb = cellCb->ueCb[ulRrcMsgInfo->ueIdx -1];
+
+
+ BuildAndSendULRRCMessageTransfer(ueCb, ulRrcMsgInfo->lcId, ulRrcMsgInfo->msgLen, \
+ ulRrcMsgInfo->rrcMsg);
+
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo->rrcMsg, ulRrcMsgInfo->msgLen);
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, ulRrcMsgInfo, sizeof(RlcUlRrcMsgInfo));
+ }
+ return ROK;
+}
+
+/*******************************************************************
+*
+* @brief Process RRC delivery report from RLC
+*
+* @details
+*
+* Function : DuProcRlcRrcDeliveryReport
+*
+* Functionality: Process RRC delivery Message from RLC
+*
+* @params[in] Post structure
+* UL RRC Message Info
+* @return ROK - success
+* RFAILED - failure
+*
+* ****************************************************************/
+uint8_t DuProcRlcRrcDeliveryReport(Pst *pst, RrcDeliveryReport *rrcDeliveryReport)
+{
+ DuCellCb *cellCb = NULLP;
+ DuUeCb ueCb;
+ uint8_t ret = RFAILED;
+
+ if(duGetCellCb(rrcDeliveryReport->cellId, &cellCb) != ROK)
+ return RFAILED;
+
+ ueCb = cellCb->ueCb[rrcDeliveryReport->ueIdx -1];
+ ret = BuildAndSendRrcDeliveryReport(ueCb.gnbCuUeF1apId, ueCb.gnbDuUeF1apId,rrcDeliveryReport);
+
+ DU_FREE_SHRABL_BUF(pst->region, pst->pool, rrcDeliveryReport, sizeof(RrcDeliveryReport));
+ return ret;
+}
+
+/*******************************************************************
+ *
+ * @brief Process UL user data from RLC
+ *
+ * @details
+ *
+ * Function : DuProcRlcUlUserDataTrans
+ *
+ * Functionality: Process UL user data from RLC
+ *
+ * @params[in] Post structure
+ * UL user data
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t DuProcRlcUlUserDataTrans(Pst *pst, RlcUlUserDatInfo *ulUserData)
+{
+ uint8_t rbIdx;
+ DuCellCb *cellCb;
+ DuUeCb ueCb;
+ EgtpMsg egtpMsg;
+ Buffer *mBuf;
+
+ if(duGetCellCb(ulUserData->cellId, &cellCb) != ROK)
+ return RFAILED;
+
+ ueCb = cellCb->ueCb[ulUserData->ueIdx -1];
+
+ DU_LOG("\nDEBUG --> DU APP : Received UL user data");
+
+ /* Fill EGTP header */
+ egtpMsg.msgHdr.msgType = EGTPU_MSG_GPDU;
+ egtpMsg.msgHdr.nPdu.pres = FALSE;
+ egtpMsg.msgHdr.seqNum.pres = FALSE;
+ egtpMsg.msgHdr.extHdr.udpPort.pres = FALSE;
+ egtpMsg.msgHdr.extHdr.pdcpNmb.pres = FALSE;
+
+ /* Fetch EGTP tunnel info */
+ /* TODO : keep the "#if 0" code block and test once DL User data changes are submitted */
+#if 0
+ for(rbIdx = 0; rbIdx < MAX_NUM_DRB; rbIdx++)
+ {
+ if(ueCb.ulTnlCfg[rbIx]->drbId == ulUserData->rbId)