X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fcm%2Fdu_app_mac_inf.c;fp=src%2Fcm%2Fdu_app_mac_inf.c;h=d5735c8802f0a90a878317b19c65284cd83678f2;hb=8144a551b3efaa006e48c00e6a2838ff662e2650;hp=c2165da6063d9be8217e6137e008b677e01d968d;hpb=d1f428c3527bfff3b3eae2715e91ae8449ad1784;p=o-du%2Fl2.git diff --git a/src/cm/du_app_mac_inf.c b/src/cm/du_app_mac_inf.c index c2165da60..d5735c880 100644 --- a/src/cm/du_app_mac_inf.c +++ b/src/cm/du_app_mac_inf.c @@ -2108,6 +2108,76 @@ uint8_t unpackDuMacUeResetRsp(MacDuUeResetRspFunc func, Pst *pst, Buffer *mBuf) return RFAILED; } +/******************************************************************* + * + * @brief Pack and send UE Sync Status Indication from MAC to DU APP + * + * @details + * + * Function : packDuMacUeSyncStatusInd + * + * Functionality: + * Pack and send UE Sync Status Indication from MAC to DU APP + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *SyncStatusInd) +{ + Buffer *mBuf = NULLP; + + if(pst->selector == ODU_SELECTOR_LWLC) + { + if (ODU_GET_MSG_BUF(pst->region, pst->pool, &mBuf) != ROK) + { + DU_LOG("\nERROR --> MAC : Memory allocation failed at packDuMacUeSyncStatusInd"); + return RFAILED; + } + /* pack the address of the structure */ + CMCHKPK(oduPackPointer,(PTR)SyncStatusInd, mBuf); + } + else + { + DU_LOG("\nERROR --> MAC: Only LWLC supported for packDuMacUeSyncStatusInd"); + return RFAILED; + } + + return ODU_POST_TASK(pst,mBuf); +} + +/******************************************************************* +* +* @brief Unpack UE Config Response from MAC to DU APP +* +* @details +* +* Function :unpackDuMacUeSyncStatusInd +* +* Functionality: Unpack UE Config Response from MAC to DU APP +* +* @params[in] +* @return ROK - success +* RFAILED - failure +* +* ****************************************************************/ +uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf) +{ + if(pst->selector == ODU_SELECTOR_LWLC) + { + MacUeSyncStatusInd *ueSyncStatusInd = NULLP; + + /* unpack the address of the structure */ + CMCHKUNPK(oduUnpackPointer, (PTR *)&ueSyncStatusInd, mBuf); + ODU_PUT_MSG_BUF(mBuf); + return (*func)(pst, ueSyncStatusInd); + } + + ODU_PUT_MSG_BUF(mBuf); + return RFAILED; +} + /******************************************************************* * * @brief Searches for first unset bit in ueBitMap