Merge "correction in F1AP message based on wireshark logs"
[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 PRIVATE CONSTANT 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 #ifdef ANSI
79 S16 RgPrgPMacSMacUeSCellCfg
80 (
81  Pst         *pst,
82  RgPrgUeSCellCfgInfo *ueSCellCfgInfo
83 )
84 #else
85 S16 RgPrgPMacSMacUeSCellCfg(pst, ueSCellCfgInfo)
86  Pst         *pst;
87  RgPrgUeSCellCfgInfo *ueSCellCfgInfo;
88 #endif
89 {
90
91    return ((*RgPrgPMacSMacUeSCellCfgReqMt[0])(pst, ueSCellCfgInfo));
92 }
93
94 /* Matrix for config confirm from SMac to Pmac*/
95 PRIVATE CONSTANT RgSMacPMacCfgCfm RgPrgSMacPMacCfgCfmMt[RG_PRG_MAX] =
96 {
97 #ifdef LCPRG
98    cmPkPrgSMacPMacCfgCfm,
99 #else
100    RgPrgSMacPMacCfgCfm
101 #endif
102 };
103
104 /**
105 * @brief Config confirm from SMac to PMac for Ue Cell Config Req 
106 *
107 * @details
108 *
109 *     Function :RgPrgSMacPMacCfg
110 *
111 *  @param[in]   Pst              *pst
112 *  @param[in]   RgPrgCfgCfmInfo  *cfmCfm
113 *  @return   S16
114 *      -# ROK
115 **/
116 #ifdef ANSI
117 S16 RgPrgSMacPMacCfg
118 (
119  Pst             *pst,
120  RgPrgCfgCfmInfo *cfgCfm
121 )
122 #else
123 S16 RgPrgSMacPMacCfg(pst, cfgCfm)
124  Pst             *pst;
125  RgPrgCfgCfmInfo *cfgCfm;
126 #endif
127 {
128
129    return ((*RgPrgSMacPMacCfgCfmMt[0])(pst, cfgCfm));
130 }
131
132 /* Matrix for Ue SCell delete req/Ue Id change req from PMac to SMac */
133 PRIVATE CONSTANT RgUeSCellDelReq RgPrgPMacSMacUeSCellDelReqMt[RG_PRG_MAX] =
134 {
135 #ifdef LCPRG
136    cmPkPrgPMacSMacUeSCellDelReq,
137 #else
138    RgPrgPMacSMacUeSCellDelReq
139 #endif
140 };
141
142 /**
143 * @brief Ue SCell delete Req/Ue Id change Req from PMac to SMac
144 *
145 * @details
146 *
147 *     Function : RgPrgPMacSMacUeSCellDel 
148 *
149 *  @param[in]   Pst                 *pst
150 *  @param[in]   RgPrgUeSCellDelInfo *ueSCellDelInfo;
151 *  @return   S16
152 *      -# ROK
153 **/
154 #ifdef ANSI
155 S16 RgPrgPMacSMacUeSCellDel
156 (
157  Pst                 *pst,
158  RgPrgUeSCellDelInfo *ueSCellDelInfo
159 )
160 #else
161 S16 RgPrgPMacSMacUeSCellDel(pst, ueSCellDelInfo)
162  Pst                 *pst;
163  RgPrgUeSCellDelInfo *ueSCellDelInfo;
164 #endif
165 {
166
167    return ((*RgPrgPMacSMacUeSCellDelReqMt[0])(pst, ueSCellDelInfo));
168 }
169
170
171
172 /* Matrix for Lch ReConfig Req*/
173 PRIVATE CONSTANT RgPrgUeScellModLchReq RgPrgPMacSMacUeScellModLchReqMt[RG_PRG_MAX] =
174 {
175 #ifdef LCPRG
176   cmPkPrgPMacSMacUeSCellLchModReq,
177 #else
178    RgPrgPMacSMacUeSCellLchModReq
179 #endif
180 };
181
182
183 /**
184 * @brief Ue Lch Reconfig Req from PMac to SMac 
185 *
186 * @details
187 *
188 *     Function : RgPrgPMacSMacUeScellLchMod
189 *
190 *  @param[in]   Pst                      *pst
191 *  @param[in]   RgPrgUeSCellLchModInfo   *lchCfgInfo
192 *  @return   S16
193 *      -# ROK
194 **/
195 #ifdef ANSI
196 S16 RgPrgPMacSMacUeScellLchMod
197 (
198  Pst                      *pst,
199  RgPrgUeSCellLchModInfo   *lchCfgInfo
200 )
201 #else
202 S16 RgPrgPMacSMacUeScellLchMod(pst, lchCfgInfo)
203  Pst                      *pst;
204  RgPrgUeSCellLchModInfo   *lchCfgInfo;
205 #endif
206 {
207
208    return ((*RgPrgPMacSMacUeScellModLchReqMt[0])(pst, lchCfgInfo));
209 }
210
211
212 /* Matrix for delete Lch Req*/
213 PRIVATE CONSTANT RgPrgUeScellDelLchReq RgPrgPMacSMacUeScellDelLchReqMt[RG_PRG_MAX] =
214 {
215 #ifdef LCPRG
216   cmPkPrgPMacSMacUeSCellLchDelReq,
217 #else
218    RgPrgPMacSMacUeSCellLchDelReq
219 #endif
220 };
221
222
223 /**
224 * @brief Delete Lch Req from PMac to SMac 
225 *
226 * @details
227 *
228 *     Function : RgPrgPMacSMacUeScellLchDel
229 *
230 *  @param[in]   Pst                      *pst
231 *  @param[in]   RgPrgUeSCellLchDelInfo   *delLcCb
232 *  @return   S16
233 *      -# ROK
234 **/
235 #ifdef ANSI
236 S16 RgPrgPMacSMacUeScellLchDel
237 (
238  Pst                       *pst,
239  RgPrgUeSCellLchDelInfo    *delLcCb
240 )
241 #else
242 S16 RgPrgPMacSMacUeScellLchDel(pst, delLcCb)
243  Pst                       *pst;
244  RgPrgUeSCellLchDelInfo    *delLcCb;
245 #endif
246 {
247
248    return ((*RgPrgPMacSMacUeScellDelLchReqMt[0])(pst, delLcCb));
249 }
250
251
252 /* Matrix for Lch Config Req*/
253 PRIVATE CONSTANT RgPrgUeScellAddLchReq RgPrgPMacSMacUeScellAddLchReqMt[RG_PRG_MAX] =
254 {
255 #ifdef LCPRG
256   cmPkPrgPMacSMacUeSCellLchAddReq,
257 #else
258    RgPrgPMacSMacUeSCellLchAddReq
259 #endif
260 };
261
262
263 /**
264 * @brief Ue Lch config Req from PMac to SMac 
265 *
266 * @details
267 *
268 *     Function : RgPrgPMacSMacUeScellLchAdd
269 *
270 *  @param[in]   Pst                      *pst
271 *  @param[in]   RgPrgUeSCellLchAddInfo   *lchCfgInfo
272 *  @return   S16
273 *      -# ROK
274 **/
275 #ifdef ANSI
276 S16 RgPrgPMacSMacUeScellLchAdd
277 (
278  Pst                      *pst,
279  RgPrgUeSCellLchAddInfo   *lchCfgInfo
280 )
281 #else
282 S16 RgPrgPMacSMacUeScellLchAdd(pst, lchCfgInfo)
283  Pst                      *pst;
284  RgPrgUeSCellLchAddInfo   *lchCfgInfo;
285 #endif
286 {
287
288    return ((*RgPrgPMacSMacUeScellAddLchReqMt[0])(pst, lchCfgInfo));
289 }
290
291 #endif /* LTE_ADV */
292
293 /**********************************************************************
294  
295          End of file
296 **********************************************************************/