[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-501] WG8 Alignment | RLC Max Retransmission...
[o-du/l2.git] / src / du_app / du_ue_mgr.c
index 98faa71..813d22b 100644 (file)
@@ -129,6 +129,55 @@ DuMacUeResetReq packMacUeResetReqOpts[] =
    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