X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Fmac_ue_mgr.c;h=99c4e8d71208d1f41217e517ebcca7af8710aab3;hb=8144a551b3efaa006e48c00e6a2838ff662e2650;hp=70b189653a76f1920477caa5cf128fae0b2db28c;hpb=d1f428c3527bfff3b3eae2715e91ae8449ad1784;p=o-du%2Fl2.git diff --git a/src/5gnrmac/mac_ue_mgr.c b/src/5gnrmac/mac_ue_mgr.c index 70b189653..99c4e8d71 100644 --- a/src/5gnrmac/mac_ue_mgr.c +++ b/src/5gnrmac/mac_ue_mgr.c @@ -55,6 +55,53 @@ MacDuUeResetRspFunc macDuUeResetRspOpts[] = DuProcMacUeResetRsp, /* packing for tightly coupled */ packDuMacUeResetRsp /* packing for light weight loosly coupled */ }; + +MacDuUeSyncStatusIndFunc macDuUeSyncStatusIndOpts[] = +{ + packDuMacUeSyncStatusInd, /* packing for loosely coupled */ + DuProcMacUeSyncStatusInd, /* packing for tightly coupled */ + packDuMacUeSyncStatusInd /* packing for light weight loosly coupled */ +}; + +/******************************************************************* +* +* @brief Fill and Send UE Sync Status Indication from MAC to DU APP +* +* @details +* +* Function : MacSendUeSyncStatusInd +* +* Functionality: Fill and Send UE Sync Status Indication from MAC to DUAPP +* +* @params[in] uint16_t cellId, uint16_t ueId, SyncStatus status +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ + +uint8_t MacSendUeSyncStatusInd(uint16_t cellId, uint16_t ueId, SyncStatus status) +{ + MacUeSyncStatusInd *ueSyncStatusInd; + Pst rspPst; + + MAC_ALLOC_SHRABL_BUF(ueSyncStatusInd, sizeof(MacUeSyncStatusInd)); + if(!ueSyncStatusInd) + { + DU_LOG("\nERROR --> MAC : Memory allocation for UE Sync Status Indication failed"); + return RFAILED; + } + + /* Filling UE Sync Status Indication */ + ueSyncStatusInd->cellId = cellId; + ueSyncStatusInd->ueId = ueId; + ueSyncStatusInd->status = status; + + /* Fill Post structure and send UE Sync Status Indication */ + memset(&rspPst, 0, sizeof(Pst)); + FILL_PST_MAC_TO_DUAPP(rspPst, EVENT_MAC_UE_SYNC_STATUS_IND); + return (*macDuUeSyncStatusIndOpts[rspPst.selector])(&rspPst, ueSyncStatusInd); +} + /******************************************************************* * * @brief Fills mac cell group config to be sent to scheduler @@ -2998,7 +3045,7 @@ uint8_t MacProcSchUeRecfgRsp(Pst *pst, SchUeRecfgRsp *schRecfgRsp) uint8_t ret = ROK; uint16_t cellIdx; MacUeRecfg *ueRecfg = NULLP; - + #ifdef CALL_FLOW_DEBUG_LOG switch(pst->event) {