Merge "correction in F1AP message based on wireshark logs"
[o-du/l2.git] / src / du_app / du_msg_hdl.c
index 4dd8cfc..d7744cb 100644 (file)
@@ -889,11 +889,10 @@ uint8_t duBindUnbindRlcToMacSap(uint8_t inst, uint8_t action)
 {
    RlcCntrl  *cntrl = NULLP;
    RlcMngmt  rlcMngmt;
-   Pst      pst;
+   Pst       pst;
 
-   TRC2(smBindKwToRguSap)
 
-      DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
+   DU_SET_ZERO(&rlcMngmt, sizeof(RlcMngmt));
    DU_SET_ZERO(&pst, sizeof(Pst));
 
    if (action == ABND)
@@ -994,7 +993,7 @@ uint8_t duSctpNtfyHdl(Buffer *mBuf, CmInetSctpNotification *ntfy)
  * ****************************************************************/
 uint8_t duFillEgtpPst(Pst *pst, Event event)
 {
-   memset((uint8_t *)pst, 0, sizeof(Pst));
+   memset(pst, 0, sizeof(Pst));
    pst->srcEnt = (Ent)ENTDUAPP;
    pst->srcInst = (Inst)DU_INST;
    pst->srcProcId = DU_PROC;
@@ -1033,8 +1032,8 @@ uint8_t duBuildEgtpCfgReq()
 
    DU_LOG("\nDU_APP : Sending EGTP config request");
 
-   memset((uint8_t *)&egtpCfg, 0, sizeof(EgtpConfig));
-   memcpy((uint8_t *)&egtpCfg, (uint8_t *)&duCfgParam.egtpParams, (PTR)sizeof(EgtpConfig));
+   memset(&egtpCfg, 0, sizeof(EgtpConfig));
+   memcpy(&egtpCfg, &duCfgParam.egtpParams, sizeof(EgtpConfig));
 
    duFillEgtpPst(&pst, EVTCFGREQ);
    packEgtpCfgReq(&pst, egtpCfg);
@@ -1203,12 +1202,6 @@ uint8_t duHdlEgtpTnlMgmtCfm(EgtpTnlEvt tnlEvtCfm)
    if(tnlEvtCfm.cfmStatus.status == LCM_PRIM_OK)
    {
       DU_LOG("\nDU_APP : Tunnel management confirm OK");
-
-#ifdef EGTP_TEST
-      duSendUeCreateReqToRlc();
-
-      duSendEgtpTestData();
-#endif      
    }
    else
    {
@@ -1282,9 +1275,9 @@ uint8_t duSendEgtpTestData()
    MsgLen    mLen;
 
    mLen = 0;
-   ODU_FIND_MSG_LEN(mBuf, &mLen);
+   ODU_GET_MSG_LEN(mBuf, &mLen);
 
-   memset((uint8_t *)&ipv4Hdr, 0, sizeof(CmIpv4Hdr));
+   memset(&ipv4Hdr, 0, sizeof(CmIpv4Hdr));
    ipv4Hdr.length = CM_IPV4_HDRLEN + mLen;
    ipv4Hdr.hdrVer = 0x45;
    ipv4Hdr.proto = 1;
@@ -1640,15 +1633,15 @@ uint8_t  duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
  * ****************************************************************/
 uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo)
 {
-
-   DU_LOG("\nDU APP : Slot Indication received");
-
    if(slotInfo->cellId <=0 || slotInfo->cellId > MAX_NUM_CELL)
    {
       DU_LOG("\nDU APP : Invalid Cell Id %d", slotInfo->cellId);
    }
    if(!duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd)
    {
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+   DU_LOG("\nDU APP : Slot Indication received");
+#endif
       duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd = true;
       if((duCb.actvCellLst[slotInfo->cellId-1] != NULL) && \
            (duCb.actvCellLst[slotInfo->cellId-1]->cellStatus == \
@@ -1852,6 +1845,35 @@ uint8_t DuProcRlcUlRrcMsgTrans(Pst *pst, RlcUlRrcMsgInfo *ulRrcMsgInfo)
    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)
+{
+       DuUeCb   ueCb;
+       uint8_t  ret = RFAILED;
+
+       ueCb = duCb.actvCellLst[rrcDeliveryReport->cellId -1]->ueCb[rrcDeliveryReport->ueIdx -1];
+       ret = BuildAndSendRrcDeliveryReport(ueCb.gnbCuUeF1apId, ueCb.gnbDuUeF1apId,rrcDeliveryReport);
+
+       DU_FREE_SHRABL_BUF(pst->region, pst->pool, rrcDeliveryReport, sizeof(RrcDeliveryReport));
+       return ret;
+}
+
+
 /**********************************************************************
   End of file
  **********************************************************************/