X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2F5gnrmac%2Frg_lim.c;fp=src%2F5gnrmac%2Frg_lim.c;h=a1a7ff122b5c680e5c668a5738faca4c5e912965;hb=0fccb83e55b237d60cf451bab71a0c7242cc6e66;hp=d710c4f226acaa0382f921dcd69513b90ac44844;hpb=6d3c64bdc3314b00244e259c4f5d5bd336d789db;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_lim.c b/src/5gnrmac/rg_lim.c index d710c4f22..a1a7ff122 100755 --- a/src/5gnrmac/rg_lim.c +++ b/src/5gnrmac/rg_lim.c @@ -740,6 +740,61 @@ int sendSlotIndMacToDuApp(SlotIndInfo *slotInd) return ret; } +/******************************************************************* + * + * @brief Send stop indication to DU APP + * + * @details + * + * Function : sendStopIndMacToDuApp + * + * Functionality: + * Send stop indication to DU APP + * + * @params[in] Pst info + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +uint8_t sendStopIndMacToDuApp() +{ + Pst pst; + uint8_t ret = ROK; + + MacCellStopInfo *cellStopId; + + /* Allocate sharable memory */ + MAC_ALLOC_SHRABL_BUF(cellStopId, sizeof(MacCellStopInfo)); + if(!cellStopId) + { + DU_LOG("\nMAC : Stop Indication memory allocation failed"); + return RFAILED; + } + cellStopId->cellId = macCb.macCell->cellId; + + /* Fill Pst */ + pst.selector = DU_MAC_LWLC; + pst.srcEnt = ENTRG; + pst.dstEnt = ENTDUAPP; + pst.dstInst = 0; + pst.srcInst = macCb.macInst; + pst.dstProcId = rgCb[pst.srcInst].rgInit.procId; + pst.srcProcId = rgCb[pst.srcInst].rgInit.procId; + pst.region = MAC_MEM_REGION; + pst.pool = MAC_POOL; + pst.event = EVENT_MAC_STOP_IND; + pst.route = 0; + pst.prior = 0; + pst.intfVer = 0; + + ret = MacDuAppStopInd(&pst, cellStopId); + if(ret != ROK) + { + DU_LOG("\nMAC: Failed to send stop indication to DU APP"); + MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, cellStopId, sizeof(MacCellStopInfo)); + } + return ROK; +} #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD) /** * @brief Transmission of non-rt indication from CL.