[Epic-ID: ODUHIGH-464][Task-ID: ODUHIGH-483] Memeory related fix in FDD and TDD mode
[o-du/l2.git] / src / 5gnrmac / rg_prg_pt.c
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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
19 /************************************************************************
20  
21      Name:     LTE-MAC layer
22   
23      Type:     C source file
24   
25      Desc:     C source code for MAC to MAC (PRG) interface 
26   
27      File:     rg_prg_pt.c 
28   
29 **********************************************************************/
30
31 /* header include files -- defines (.h) */
32 #include "common_def.h"
33 #include "lrg.h"           /* layer manager for MAC */
34 #include "crg.h"           /* CRG interface includes*/
35 #include "rgu.h"           /* RGU interface includes*/
36 #include "tfu.h"           /* TFU interface includes*/
37 #include "rg_sch_inf.h"    /* SCH interface includes*/
38 #include "rg_prg.h"        /* PRG interface includes*/
39 #include "rg_env.h"        /* MAC Enviroments includes */
40 #include "rg.h"            /* MAC includes*/
41 #include "rg_err.h"        /* MAC error includes*/
42
43 /* header/extern include files (.x) */
44 #include "rgu.x"           /* RGU types */
45 #include "tfu.x"           /* RGU types */
46 #include "lrg.x"           /* layer management typedefs for MAC */
47 #include "crg.x"           /* layer management typedefs for MAC */
48 #include "rg_sch_inf.x"    /* layer management typedefs for MAC */
49 #include "rg_prg.x"        /* PRG interface typedefs*/
50 #include "du_app_mac_inf.h"
51 #include "rg.x"            /* typedefs for MAC */
52
53 #ifdef LTE_ADV
54 #include "rg_pom_scell.x"
55
56 /* Matrix for Ue SCell Config Req*/
57 static const RgPrgUeSCellCfgReq RgPrgPMacSMacUeSCellCfgReqMt[RG_PRG_MAX] =
58 {
59 #ifdef LCPRG
60   cmPkPrgPMacSMacUeSCellCfgReq,
61 #else
62    RgPrgPMacSMacUeSCellCfgReq
63 #endif
64 };
65
66 /**
67 * @brief Ue SCell config Req from PMac to SMac 
68 *
69 * @details
70 *
71 *     Function : RgPrgPMacSMacUeSCellCfg
72 *
73 *  @param[in]   Pst         *pst
74 *  @param[in]   RgPrgUeSCellCfgInfo *ueSCellCfgInfo;
75 *  @return   S16
76 *      -# ROK
77 **/
78 S16 RgPrgPMacSMacUeSCellCfg(Pst *pst, RgPrgUeSCellCfgInfo *ueSCellCfgInfo)
79 {
80
81    return ((*RgPrgPMacSMacUeSCellCfgReqMt[0])(pst, ueSCellCfgInfo));
82 }
83
84 /* Matrix for config confirm from SMac to Pmac*/
85 static const RgSMacPMacCfgCfm RgPrgSMacPMacCfgCfmMt[RG_PRG_MAX] =
86 {
87 #ifdef LCPRG
88    cmPkPrgSMacPMacCfgCfm,
89 #else
90    RgPrgSMacPMacCfgCfm
91 #endif
92 };
93
94 /**
95 * @brief Config confirm from SMac to PMac for Ue Cell Config Req 
96 *
97 * @details
98 *
99 *     Function :RgPrgSMacPMacCfg
100 *
101 *  @param[in]   Pst              *pst
102 *  @param[in]   RgPrgCfgCfmInfo  *cfmCfm
103 *  @return   S16
104 *      -# ROK
105 **/
106 S16 RgPrgSMacPMacCfg(Pst *pst,RgPrgCfgCfmInfo *cfgCfm)
107 {
108
109    return ((*RgPrgSMacPMacCfgCfmMt[0])(pst, cfgCfm));
110 }
111
112 /* Matrix for Ue SCell delete req/Ue Id change req from PMac to SMac */
113 static const RgUeSCellDelReq RgPrgPMacSMacUeSCellDelReqMt[RG_PRG_MAX] =
114 {
115 #ifdef LCPRG
116    cmPkPrgPMacSMacUeSCellDelReq,
117 #else
118    RgPrgPMacSMacUeSCellDelReq
119 #endif
120 };
121
122 /**
123 * @brief Ue SCell delete Req/Ue Id change Req from PMac to SMac
124 *
125 * @details
126 *
127 *     Function : RgPrgPMacSMacUeSCellDel 
128 *
129 *  @param[in]   Pst                 *pst
130 *  @param[in]   RgPrgUeSCellDelInfo *ueSCellDelInfo;
131 *  @return   S16
132 *      -# ROK
133 **/
134 S16 RgPrgPMacSMacUeSCellDel(Pst *pst,RgPrgUeSCellDelInfo *ueSCellDelInfo)
135 {
136
137    return ((*RgPrgPMacSMacUeSCellDelReqMt[0])(pst, ueSCellDelInfo));
138 }
139
140
141
142 /* Matrix for Lch ReConfig Req*/
143 static const RgPrgUeScellModLchReq RgPrgPMacSMacUeScellModLchReqMt[RG_PRG_MAX] =
144 {
145 #ifdef LCPRG
146   cmPkPrgPMacSMacUeSCellLchModReq,
147 #else
148    RgPrgPMacSMacUeSCellLchModReq
149 #endif
150 };
151
152
153 /**
154 * @brief Ue Lch Reconfig Req from PMac to SMac 
155 *
156 * @details
157 *
158 *     Function : RgPrgPMacSMacUeScellLchMod
159 *
160 *  @param[in]   Pst                      *pst
161 *  @param[in]   RgPrgUeSCellLchModInfo   *lchCfgInfo
162 *  @return   S16
163 *      -# ROK
164 **/
165 S16 RgPrgPMacSMacUeScellLchMod(Pst *pst,RgPrgUeSCellLchModInfo *lchCfgInfo)
166 {
167
168    return ((*RgPrgPMacSMacUeScellModLchReqMt[0])(pst, lchCfgInfo));
169 }
170
171
172 /* Matrix for delete Lch Req*/
173 static const RgPrgUeScellDelLchReq RgPrgPMacSMacUeScellDelLchReqMt[RG_PRG_MAX] =
174 {
175 #ifdef LCPRG
176   cmPkPrgPMacSMacUeSCellLchDelReq,
177 #else
178    RgPrgPMacSMacUeSCellLchDelReq
179 #endif
180 };
181
182
183 /**
184 * @brief Delete Lch Req from PMac to SMac 
185 *
186 * @details
187 *
188 *     Function : RgPrgPMacSMacUeScellLchDel
189 *
190 *  @param[in]   Pst                      *pst
191 *  @param[in]   RgPrgUeSCellLchDelInfo   *delLcCb
192 *  @return   S16
193 *      -# ROK
194 **/
195 S16 RgPrgPMacSMacUeScellLchDel(Pst *pst,RgPrgUeSCellLchDelInfo *delLcCb)
196 {
197
198    return ((*RgPrgPMacSMacUeScellDelLchReqMt[0])(pst, delLcCb));
199 }
200
201
202 /* Matrix for Lch Config Req*/
203 static const RgPrgUeScellAddLchReq RgPrgPMacSMacUeScellAddLchReqMt[RG_PRG_MAX] =
204 {
205 #ifdef LCPRG
206   cmPkPrgPMacSMacUeSCellLchAddReq,
207 #else
208    RgPrgPMacSMacUeSCellLchAddReq
209 #endif
210 };
211
212
213 /**
214 * @brief Ue Lch config Req from PMac to SMac 
215 *
216 * @details
217 *
218 *     Function : RgPrgPMacSMacUeScellLchAdd
219 *
220 *  @param[in]   Pst                      *pst
221 *  @param[in]   RgPrgUeSCellLchAddInfo   *lchCfgInfo
222 *  @return   S16
223 *      -# ROK
224 **/
225 S16 RgPrgPMacSMacUeScellLchAdd(Pst *pst,RgPrgUeSCellLchAddInfo *lchCfgInfo)
226 {
227
228    return ((*RgPrgPMacSMacUeScellAddLchReqMt[0])(pst, lchCfgInfo));
229 }
230
231 #endif /* LTE_ADV */
232
233 /**********************************************************************
234  
235          End of file
236 **********************************************************************/