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 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code for MAC to MAC (PRG) interface
29 **********************************************************************/
31 /* header include files -- defines (.h) */
32 #include "envopt.h" /* environment options */
33 #include "envdep.h" /* environment dependent */
34 #include "envind.h" /* environment independent */
35 #include "gen.h" /* general layer */
36 #include "ssi.h" /* system service interface */
37 #include "cm_hash.h" /* common hash list */
38 #include "cm_mblk.h" /* common memory link list library */
39 #include "cm_llist.h" /* common linked list library */
40 #include "cm_err.h" /* common error */
41 #include "cm_lte.h" /* common LTE */
42 #include "lrg.h" /* layer manager for MAC */
43 #include "crg.h" /* CRG interface includes*/
44 #include "rgu.h" /* RGU interface includes*/
45 #include "tfu.h" /* TFU interface includes*/
46 #include "rg_sch_inf.h" /* SCH interface includes*/
47 #include "rg_prg.h" /* PRG interface includes*/
48 #include "rg_env.h" /* MAC Enviroments includes */
49 #include "rg.h" /* MAC includes*/
50 #include "rg_err.h" /* MAC error includes*/
52 /* header/extern include files (.x) */
53 #include "gen.x" /* general layer typedefs */
54 #include "ssi.x" /* system services typedefs */
55 #include "cm5.x" /* common timers */
56 #include "cm_hash.x" /* common hash list */
57 #include "cm_lib.x" /* common library */
58 #include "cm_llist.x" /* common linked list */
59 #include "cm_mblk.x" /* memory management */
60 #include "cm_tkns.x" /* common tokens */
61 #include "cm_lte.x" /* common tokens */
62 #include "rgu.x" /* RGU types */
63 #include "tfu.x" /* RGU types */
64 #include "lrg.x" /* layer management typedefs for MAC */
65 #include "crg.x" /* layer management typedefs for MAC */
66 #include "rg_sch_inf.x" /* layer management typedefs for MAC */
67 #include "rg_prg.x" /* PRG interface typedefs*/
68 #include "du_app_mac_inf.h"
69 #include "rg.x" /* typedefs for MAC */
72 #include "rg_pom_scell.x"
74 /* Matrix for Ue SCell Config Req*/
75 PRIVATE CONSTANT RgPrgUeSCellCfgReq RgPrgPMacSMacUeSCellCfgReqMt[RG_PRG_MAX] =
78 cmPkPrgPMacSMacUeSCellCfgReq,
80 RgPrgPMacSMacUeSCellCfgReq
85 * @brief Ue SCell config Req from PMac to SMac
89 * Function : RgPrgPMacSMacUeSCellCfg
92 * @param[in] RgPrgUeSCellCfgInfo *ueSCellCfgInfo;
97 PUBLIC S16 RgPrgPMacSMacUeSCellCfg
100 RgPrgUeSCellCfgInfo *ueSCellCfgInfo
103 PUBLIC S16 RgPrgPMacSMacUeSCellCfg(pst, ueSCellCfgInfo)
105 RgPrgUeSCellCfgInfo *ueSCellCfgInfo;
109 TRC3(RgPrgPMacSMacUeSCellCfg);
111 RETVALUE((*RgPrgPMacSMacUeSCellCfgReqMt[0])(pst, ueSCellCfgInfo));
114 /* Matrix for config confirm from SMac to Pmac*/
115 PRIVATE CONSTANT RgSMacPMacCfgCfm RgPrgSMacPMacCfgCfmMt[RG_PRG_MAX] =
118 cmPkPrgSMacPMacCfgCfm,
125 * @brief Config confirm from SMac to PMac for Ue Cell Config Req
129 * Function :RgPrgSMacPMacCfg
131 * @param[in] Pst *pst
132 * @param[in] RgPrgCfgCfmInfo *cfmCfm
137 PUBLIC S16 RgPrgSMacPMacCfg
140 RgPrgCfgCfmInfo *cfgCfm
143 PUBLIC S16 RgPrgSMacPMacCfg(pst, cfgCfm)
145 RgPrgCfgCfmInfo *cfgCfm;
149 TRC3(RgPrgSMacPMacCfg);
151 RETVALUE((*RgPrgSMacPMacCfgCfmMt[0])(pst, cfgCfm));
154 /* Matrix for Ue SCell delete req/Ue Id change req from PMac to SMac */
155 PRIVATE CONSTANT RgUeSCellDelReq RgPrgPMacSMacUeSCellDelReqMt[RG_PRG_MAX] =
158 cmPkPrgPMacSMacUeSCellDelReq,
160 RgPrgPMacSMacUeSCellDelReq
165 * @brief Ue SCell delete Req/Ue Id change Req from PMac to SMac
169 * Function : RgPrgPMacSMacUeSCellDel
171 * @param[in] Pst *pst
172 * @param[in] RgPrgUeSCellDelInfo *ueSCellDelInfo;
177 PUBLIC S16 RgPrgPMacSMacUeSCellDel
180 RgPrgUeSCellDelInfo *ueSCellDelInfo
183 PUBLIC S16 RgPrgPMacSMacUeSCellDel(pst, ueSCellDelInfo)
185 RgPrgUeSCellDelInfo *ueSCellDelInfo;
189 TRC3(RgPrgPMacSMacUeSCellDel);
191 RETVALUE((*RgPrgPMacSMacUeSCellDelReqMt[0])(pst, ueSCellDelInfo));
196 /* Matrix for Lch ReConfig Req*/
197 PRIVATE CONSTANT RgPrgUeScellModLchReq RgPrgPMacSMacUeScellModLchReqMt[RG_PRG_MAX] =
200 cmPkPrgPMacSMacUeSCellLchModReq,
202 RgPrgPMacSMacUeSCellLchModReq
208 * @brief Ue Lch Reconfig Req from PMac to SMac
212 * Function : RgPrgPMacSMacUeScellLchMod
214 * @param[in] Pst *pst
215 * @param[in] RgPrgUeSCellLchModInfo *lchCfgInfo
220 PUBLIC S16 RgPrgPMacSMacUeScellLchMod
223 RgPrgUeSCellLchModInfo *lchCfgInfo
226 PUBLIC S16 RgPrgPMacSMacUeScellLchMod(pst, lchCfgInfo)
228 RgPrgUeSCellLchModInfo *lchCfgInfo;
232 TRC3(RgPrgPMacSMacUeScellLchMod);
234 RETVALUE((*RgPrgPMacSMacUeScellModLchReqMt[0])(pst, lchCfgInfo));
238 /* Matrix for delete Lch Req*/
239 PRIVATE CONSTANT RgPrgUeScellDelLchReq RgPrgPMacSMacUeScellDelLchReqMt[RG_PRG_MAX] =
242 cmPkPrgPMacSMacUeSCellLchDelReq,
244 RgPrgPMacSMacUeSCellLchDelReq
250 * @brief Delete Lch Req from PMac to SMac
254 * Function : RgPrgPMacSMacUeScellLchDel
256 * @param[in] Pst *pst
257 * @param[in] RgPrgUeSCellLchDelInfo *delLcCb
262 PUBLIC S16 RgPrgPMacSMacUeScellLchDel
265 RgPrgUeSCellLchDelInfo *delLcCb
268 PUBLIC S16 RgPrgPMacSMacUeScellLchDel(pst, delLcCb)
270 RgPrgUeSCellLchDelInfo *delLcCb;
274 TRC3(RgPrgPMacSMacUeScellLchDel);
276 RETVALUE((*RgPrgPMacSMacUeScellDelLchReqMt[0])(pst, delLcCb));
280 /* Matrix for Lch Config Req*/
281 PRIVATE CONSTANT RgPrgUeScellAddLchReq RgPrgPMacSMacUeScellAddLchReqMt[RG_PRG_MAX] =
284 cmPkPrgPMacSMacUeSCellLchAddReq,
286 RgPrgPMacSMacUeSCellLchAddReq
292 * @brief Ue Lch config Req from PMac to SMac
296 * Function : RgPrgPMacSMacUeScellLchAdd
298 * @param[in] Pst *pst
299 * @param[in] RgPrgUeSCellLchAddInfo *lchCfgInfo
304 PUBLIC S16 RgPrgPMacSMacUeScellLchAdd
307 RgPrgUeSCellLchAddInfo *lchCfgInfo
310 PUBLIC S16 RgPrgPMacSMacUeScellLchAdd(pst, lchCfgInfo)
312 RgPrgUeSCellLchAddInfo *lchCfgInfo;
316 TRC3(RgPrgPMacSMacUeScellLchAdd);
318 RETVALUE((*RgPrgPMacSMacUeScellAddLchReqMt[0])(pst, lchCfgInfo));
323 /**********************************************************************
326 **********************************************************************/