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"
26 #include "mac_upr_inf_api.h"
27 #include "mac_utils.h"
29 /*******************************************************************
31 * @brief Send stop indication to DU APP
35 * Function : sendStopIndToDuApp
38 * Send stop indication to DU APP
40 * @params[in] Pst info
41 * @return ROK - success
44 * ****************************************************************/
45 uint8_t sendStopIndToDuApp(uint16_t cellId)
49 MacCellStopInfo *cellStopInd;
51 /* Allocate sharable memory */
52 MAC_ALLOC_SHRABL_BUF(cellStopInd, sizeof(MacCellStopInfo));
55 DU_LOG("\nMAC : Stop Indication memory allocation failed");
58 cellStopInd->cellId = cellId;
61 FILL_PST_MAC_TO_DUAPP(pst, EVENT_MAC_STOP_IND);
63 ret = MacDuAppStopInd(&pst, cellStopInd);
66 DU_LOG("\nMAC: Failed to send stop indication to DU APP");
67 MAC_FREE_SHRABL_BUF(MAC_MEM_REGION, MAC_POOL, cellStopInd, sizeof(MacCellStopInfo));
72 /*******************************************************************
73 * @brief process Stop indication to MAC
77 * Function : fapiMacStopInd
83 ******************************************************************/
84 uint8_t fapiMacStopInd(Pst *pst, uint16_t cellId)
87 ret = sendStopIndToDuApp(cellId);
91 /**********************************************************************
93 ***********************************************************************/