[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-501] WG8 Alignment | Ue reset req and rsp
[o-du/l2.git] / src / du_app / du_cell_mgr.c
index 6182d6a..191240f 100644 (file)
@@ -246,13 +246,13 @@ uint8_t checkPagingRecord(DuCellCb *cellCb)
  *
  *    Functionality: Send pcch indication to MAC
  *
- * @Params[in] MacPcchInd *pcchInd
+ * @Params[in] DlPcchInd *pcchInd
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
 
-uint8_t sendDlPcchIndToMac(MacPcchInd *pcchInd)
+uint8_t sendDlPcchIndToMac(DlPcchInd *pcchInd)
 {
    uint8_t ret = ROK;
    Pst pst;
@@ -360,14 +360,15 @@ uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId)
       cellCb->cellStatus = ACTIVATED;
       gCellStatus = CELL_UP;
 
-      if(duCfgParam.tempSliceCfg.rrmPolicy)
-         BuildAndSendSliceConfigReq(duCfgParam.tempSliceCfg.rrmPolicy, duCfgParam.tempSliceCfg.totalRrmPolicy, duCfgParam.tempSliceCfg.totalSliceCount);
+      if(duCfgParam.tempSliceCfg.numOfRrmPolicy)
+         BuildAndSendSliceConfigReq();
 #ifdef O1_ENABLE
       DU_LOG("\nINFO   -->  DU APP : Raise cell UP alarm for cell id=%d", cellId->cellId);
       raiseCellAlrm(CELL_UP_ALARM_ID, cellId->cellId);
       setCellOpState(cellId->cellId, ENABLED, ACTIVE);
 #endif
-
+       duCfgParam.macCellCfg.cellCfg.opState = OP_ENABLED;
+       duCfgParam.macCellCfg.cellCfg.cellState = CELL_ACTIVE;
    }
 
    if((pst->selector == ODU_SELECTOR_LWLC) || (pst->selector == ODU_SELECTOR_TC))
@@ -399,7 +400,7 @@ uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *deleteRsp)
 
    if(deleteRsp)
    {
-      if(deleteRsp->result == SUCCESSFUL_RSP)
+      if(deleteRsp->status == SUCCESSFUL)
       {
          GET_CELL_IDX(deleteRsp->cellId, cellIdx);
          DU_LOG("\nINFO   -->  DU APP : MAC CELL Delete Response : SUCCESS [CELL IDX : %d]", deleteRsp->cellId);
@@ -473,9 +474,9 @@ uint8_t sendCellDeleteReqToMac(uint16_t cellId)
 {
    Pst pst;
    uint8_t ret=ROK;
-   MacCellDelete *cellDelete = NULLP;
+   MacCellDeleteReq *cellDelete = NULLP;
    
-   DU_ALLOC_SHRABL_BUF(cellDelete, sizeof(MacCellDelete));
+   DU_ALLOC_SHRABL_BUF(cellDelete, sizeof(MacCellDeleteReq));
    if(cellDelete)
    {
       cellDelete->cellId = cellId;
@@ -487,7 +488,7 @@ uint8_t sendCellDeleteReqToMac(uint16_t cellId)
       if(ret == RFAILED)
       {
          DU_LOG("\nERROR  -->  DU APP : sendCellDeleteReqToMac(): Failed to send Cell delete Req to MAC");
-         DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cellDelete, sizeof(MacCellDelete));
+         DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, cellDelete, sizeof(MacCellDeleteReq));
       }
    }
    else
@@ -624,7 +625,7 @@ uint8_t BuildAndSendDlPcchIndToMac(uint16_t cellId, uint16_t pf, uint8_t i_s, Cm
    PCCH_Message_t *pcchMsg = NULLP;
    asn_enc_rval_t encRetVal;
    PagingRrc_t    *pagingMsg = NULLP;
-   MacPcchInd     *macPcchInd = NULLP;
+   DlPcchInd     *macPcchInd = NULLP;
    uint8_t        recordIdx = 0, ret = RFAILED;
    
    /*As per 38.473 Sec 9.3.1.39,5G-S-TMSI :48 Bits >>  Bytes and 0 UnusedBits */
@@ -729,7 +730,7 @@ uint8_t BuildAndSendDlPcchIndToMac(uint16_t cellId, uint16_t pf, uint8_t i_s, Cm
       memset(encBuf, 0, ENC_BUF_MAX_LEN);
       encBufSize = 0;
        /* Encode the PCCH RRC PDU as APER */
-      encRetVal = aper_encode(&asn_DEF_PCCH_Message, 0, pcchMsg, PrepFinalEncBuf,\
+      encRetVal = uper_encode(&asn_DEF_PCCH_Message, 0, pcchMsg, PrepFinalEncBuf,\
             encBuf);
 
       if(encRetVal.encoded == ENCODE_FAIL)
@@ -742,7 +743,7 @@ uint8_t BuildAndSendDlPcchIndToMac(uint16_t cellId, uint16_t pf, uint8_t i_s, Cm
       {
          DU_LOG("\nDEBUG  -->  F1AP : Created APER encoded buffer for RRC PDU for Pcch indication \n");
          
-         DU_ALLOC_SHRABL_BUF(macPcchInd, sizeof(MacPcchInd));
+         DU_ALLOC_SHRABL_BUF(macPcchInd, sizeof(DlPcchInd));
          if(macPcchInd == NULLP)
          {
             DU_LOG("\nERROR  -->  DU APP: BuildAndSendDlPcchIndToMac(); (macPcchInd) Memory Alloction failed!");
@@ -764,7 +765,7 @@ uint8_t BuildAndSendDlPcchIndToMac(uint16_t cellId, uint16_t pf, uint8_t i_s, Cm
          if(ret != ROK)
          {
             DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, macPcchInd->pcchPdu, macPcchInd->pduLen);
-            DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, macPcchInd, sizeof(MacPcchInd));
+            DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, macPcchInd, sizeof(DlPcchInd));
             break;
          }
       }