1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
18 /* header include files (.h) */
19 #include "common_def.h"
22 #include "du_app_mac_inf.h"
23 #include "mac_sch_interface.h"
24 #include "lwr_mac_upr_inf.h"
25 #include "rlc_mac_inf.h"
27 #include "mac_upr_inf_api.h"
28 #include "mac_utils.h"
30 /*******************************************************************
32 * @brief Send stop indication to DU APP
36 * Function : sendStopIndToDuApp
39 * Send stop indication to DU APP
41 * @params[in] Pst info
42 * @return ROK - success
45 * ****************************************************************/
46 uint8_t sendStopIndToDuApp(uint16_t cellId)
50 MacCellStopInfo *cellStopInd;
52 /* Allocate sharable memory */
53 MAC_ALLOC_SHRABL_BUF(cellStopInd, sizeof(MacCellStopInfo));
56 DU_LOG("\nMAC : Stop Indication memory allocation failed");
59 cellStopInd->cellId = cellId;
62 FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_STOP_IND);
64 ret = MacDuAppStopInd(&pst, cellStopInd);
67 DU_LOG("\nMAC: Failed to send stop indication to DU APP");
68 MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, cellStopInd, sizeof(MacCellStopInfo));
73 /*******************************************************************
74 * @brief process Stop indication to MAC
78 * Function : fapiMacStopInd
84 ******************************************************************/
85 uint8_t fapiMacStopInd(Pst *pst, uint16_t *cellId)
88 ret = sendStopIndToDuApp(*cellId);
89 MAC_FREE_SHRABL_BUF(pst->region, pst->pool, cellId, sizeof(uint16_t));
93 /**********************************************************************
95 ***********************************************************************/