fdf480183d212415d3841b5760178c4ac0b8a913
[o-du/l2.git] / src / 5gnrrlc / kw_udx_ptdl.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-RLC ULDL Interface
22   
23      Type:     C source file
24   
25      Desc:     C source code for INF Interface Module 
26   
27      File:     kw_udx_ptdl.c
28   
29 **********************************************************************/
30
31 /** @file kw_udx_ptdl.c
32 */
33
34 /* header include files (.h) */
35 #include "common_def.h"
36 #include "lkw.h"           /* LKW defines */
37 #include "ckw.h"           /* CKW defines */
38 #include "kwu.h"           /* KWU defines */
39 #include "rgu.h"           /* RGU defines */
40 #include "kw_err.h"        /* Err defines */
41 #include "kw_env.h"        /* RLC environment options */
42
43 #include "kw.h"            /* RLC defines */
44 #include "kw_udx.h"
45 #include "kw_dl.h"
46
47
48 /* extern (.x) include files */
49 #include "lkw.x"           /* LKW */
50 #include "ckw.x"           /* CKW */
51 #include "kwu.x"           /* KWU */
52 #include "rgu.x"           /* RGU */
53
54 #include "kw.x"
55 #include "kw_udx.x"
56 #include "kw_dl.x"
57
58
59 #define UDX_MAX_SEL   3
60
61 #ifndef LCKWULUDX
62 PRIVATE S16 PtDlUdxBndCfm ARGS(( Pst *pst,SuId suId,U8 status ));
63 PRIVATE S16 PtDlUdxCfgCfm ARGS((Pst *pst, SuId suId, RlcCfgCfmInfo *cfmInfo));
64 PRIVATE S16 PtDlUdxUeIdChgCfm ARGS(( Pst *pst, SuId suId,U32 transId, 
65                                      CmStatus status));
66 PRIVATE S16  PtDlUdxStaUpdCfm ARGS(( Pst* pst,SuId suId,CmLteRlcId *rlcId,
67                               RlcUdxBufLst *pBufLst));
68
69 /* UDX Bind Confirm primitive */
70 /**
71  *
72  * @brief 
73  *
74  *        Handler for confirming  the bind request received from KWU
75  *        interface.
76  *
77  * @b Description:
78  *
79  *        This function send the bind confirm primitive to the RLC user,
80  *        when it receives a bind request from its service user.
81  *
82  *  @param[in] pst     Post structure  
83  *  @param[in] suId    Service user SAP ID 
84  *  @param[in] status  Status of Confirmation 
85  *
86  *  @return  S16
87  *      -# ROK 
88  *
89  */
90 #ifdef ANSI
91 PRIVATE S16 PtDlUdxBndCfm
92 (
93 Pst *pst,                       /* post structure */
94 SuId suId,                      /* Service User Id */
95 U8   status                     /* Status */
96 )
97 #else
98 PRIVATE S16 PtDlUdxBndCfm(pst, suId, status)
99 Pst *pst;                       /* post structure */
100 SuId suId;                      /* Service User Id */
101 U8   status;                    /* Status */
102 #endif
103 {
104    TRC3(PtDlUdxBndCfm)
105
106    return ROK;
107
108 } /* end of rlcDlUdxBndCfm */
109
110
111
112 /**
113  *
114  * @brief 
115  *
116  *        Handler for confirming  the bind request received from KWU
117  *        interface.
118  *
119  * @b Description:
120  *
121  *        This function send the bind confirm primitive to the RLC user,
122  *        when it receives a bind request from its service user.
123  *
124  *  @param[in] pst     Post structure  
125  *  @param[in] suId    Service user SAP ID 
126  *  @param[in] status  Status of Confirmation 
127  *
128  *  @return  S16
129  *      -# ROK 
130  *
131  */
132 #ifdef ANSI
133 PRIVATE S16 PtDlUdxCfgCfm
134 (
135 Pst *pst,                       /* post structure */
136 SuId suId,                      /* Service User Id */
137 RlcCfgCfmInfo *cfmInfo                    /* Status */
138 )
139 #else
140 PRIVATE S16 PtDlUdxCfgCfm(pst, suId, status)
141 Pst           *pst;            /* post structure */
142 SuId          suId;            /* Service User Id */
143 RlcCfgCfmInfo *cfmInfo;        /* Status */
144 #endif
145 {
146    TRC3(PtDlUdxCfgCfm)
147
148    return ROK;
149
150 } /* end of rlcDlUdxBndCfm */
151
152 /**
153  *
154  * @brief 
155  *
156  *        Handler for confirming  the bind request received from KWU
157  *        interface.
158  *
159  * @b Description:
160  *
161  *        This function send the bind confirm primitive to the RLC user,
162  *        when it receives a bind request from its service user.
163  *
164  *  @param[in] pst     Post structure  
165  *  @param[in] suId    Service user SAP ID 
166  *  @param[in] status  Status of Confirmation 
167  *
168  *  @return  S16
169  *      -# ROK 
170  *
171  */
172 #ifdef ANSI
173 PRIVATE S16 PtDlUdxUeIdChgCfm
174 (
175 Pst *pst,                       /* post structure */
176 SuId suId,                      /* Service User Id */
177 U32       transId,
178 CmStatus      status
179 )
180 #else
181 PRIVATE S16 PtDlUdxUeIdChgCfm(pst, suId, status)
182 Pst           *pst;            /* post structure */
183 SuId          suId;            /* Service User Id */
184 U32           transId;
185 CmStatus      status;
186 #endif
187 {
188    TRC3(PtDlUdxUeIdChgCfm)
189
190    return ROK;
191
192 } /* end of rlcDlUdxBndCfm */
193
194
195
196 PRIVATE S16  PtDlUdxStaUpdCfm
197 (
198 Pst*                pst,
199 SuId                suId,
200 CmLteRlcId          *rlcId,
201 RlcUdxBufLst         *pBufLst
202 )
203 {
204    TRC3(PtDlUdxStaUpdCfm);
205    return ROK;
206 }
207
208 PRIVATE S16  PtDlUdxStaProhTmrStart
209 (
210 Pst*                pst,
211 SuId                suId,
212 CmLteRlcId          *rlcId
213 )
214 {
215    TRC3(PtDlUdxStaProhTmrStart);
216    return ROK;
217 }
218 #endif
219
220 PRIVATE UdxBndCfm rlcDlUdxBndCfmMt[UDX_MAX_SEL] =
221 {
222 #ifdef LCKWULUDX
223    cmPkUdxBndCfm,            /* 0 - loosely coupled */
224 #else
225    PtDlUdxBndCfm,            /* 0 - loosely coupled, portable  */
226 #endif /* LCKWUIKWU */
227 #ifdef LWLCKWULUDX
228    cmPkUdxBndCfm,            /* 1 - loosely coupled */
229 #else
230    PtDlUdxBndCfm,            /* 1 - loosely coupled, portable  */
231 #endif /* LCKWUIKWU */
232 #ifdef KW
233    rlcUlUdxBndCfm,            /* 2 - tightly coupled, RRC  */
234 #else
235    PtDlUdxBndCfm,            /* 2 - tightly coupled, portable */
236 #endif /* KW */
237 };
238
239 UdxCfgCfm rlcDlUdxCfgCfmMt[UDX_MAX_SEL] =
240 {
241 #ifdef LCKWULUDX
242    cmPkUdxCfgCfm,            /* 0 - loosely coupled */
243 #else
244    PtDlUdxCfgCfm,            /* 0 - loosely coupled, portable  */
245 #endif /* LCKWUIKWU */
246 #ifdef LWLCKWULUDX
247    cmPkUdxCfgCfm,            /* 1 - loosely coupled */
248 #else
249    PtDlUdxCfgCfm,            /* 1 - loosely coupled, portable  */
250 #endif /* LCKWUIKWU */
251 #ifdef KW
252    rlcUlUdxCfgCfm,            /* 2 - tightly coupled, RRC  */
253 #else
254    PtDlUdxCfgCfm,            /* 2 - tightly coupled, portable */
255 #endif /* KW */
256 };
257
258 UdxUeIdChgCfm rlcDlUdxUeIdChgCfmMt[UDX_MAX_SEL] =
259 {
260 #ifdef LCKWULUDX
261    cmPkUdxUeIdChgCfm,            /* 0 - loosely coupled */
262 #else
263    PtDlUdxUeIdChgCfm,            /* 0 - loosely coupled, portable  */
264 #endif /* LCKWUIKWU */
265 #ifdef LWLCKWULUDX
266    cmPkUdxUeIdChgCfm,            /* 1 - loosely coupled */
267 #else
268    PtDlUdxUeIdChgCfm,            /* 1 - loosely coupled, portable  */
269 #endif /* LCKWUIKWU */
270 #ifdef KW
271    rlcUlUdxUeIdChgCfm,            /* 2 - tightly coupled, RRC  */
272 #else
273    PtDlUdxUeIdChgCfm,            /* 2 - tightly coupled, portable */
274 #endif /* KW */
275 };
276
277
278 PRIVATE CONSTANT UdxStaProhTmrStart rlcDlUdxStaProhTmrStartMt[UDX_MAX_SEL] =
279 {
280 #ifdef LCKWULUDX
281    cmPkUdxStaProhTmrStart,
282 #else
283    PtDlUdxStaProhTmrStart,
284 #endif
285 #ifdef LWLCKWULUDX
286    cmPkUdxStaProhTmrStart,            /* 1 - loosely coupled */
287 #else
288    PtDlUdxStaProhTmrStart,            /* 1 - loosely coupled, portable  */
289 #endif /* LCKWUIKWU */
290 #ifdef KW
291    rlcUlUdxStaProhTmrStart,            /* 2 - tightly coupled, RRC  */
292 #else
293    PtDlUdxStaProhTmrStart,            /* 2 - tightly coupled, portable */
294 #endif /* KW */
295 };
296
297 /**
298  *
299  * @brief 
300  *
301  *        Handler for confirming  the bind request received from KWU
302  *        interface.
303  *
304  * @b Description:
305  *
306  *        This function send the bind confirm primitive to the RLC user,
307  *        when it receives a bind request from its service user.
308  *
309  *  @param[in] pst     Post structure  
310  *  @param[in] suId    Service user SAP ID 
311  *  @param[in] status  Status of Confirmation 
312  *
313  *  @return  S16
314  *      -# ROK 
315  *
316  */
317 #ifdef ANSI
318 S16 rlcDlUdxBndCfm
319 (
320 Pst *pst,                       /* post structure */
321 SuId suId,                      /* Service User Id */
322 U8   status                     /* Status */
323 )
324 #else
325 S16 rlcDlUdxBndCfm(pst, suId, status)
326 Pst *pst;                       /* post structure */
327 SuId suId;                      /* Service User Id */
328 U8   status;                    /* Status */
329 #endif
330 {
331    TRC3(rlcDlUdxBndCfm)
332
333    /* jump to specific primitive depending on configured selector */
334    (*rlcDlUdxBndCfmMt[pst->selector])(pst, suId, status);
335
336    return ROK;
337
338 } /* end of rlcDlUdxBndCfm */
339
340
341
342 /**
343  *
344  * @brief 
345  *
346  *        Handler for confirming  the bind request received from KWU
347  *        interface.
348  *
349  * @b Description:
350  *
351  *        This function send the bind confirm primitive to the RLC user,
352  *        when it receives a bind request from its service user.
353  *
354  *  @param[in] pst     Post structure  
355  *  @param[in] suId    Service user SAP ID 
356  *  @param[in] status  Status of Confirmation 
357  *
358  *  @return  S16
359  *      -# ROK 
360  *
361  */
362 #ifdef ANSI
363 S16 rlcDlUdxCfgCfm
364 (
365 Pst *pst,                       /* post structure */
366 SuId suId,                      /* Service User Id */
367 RlcCfgCfmInfo *cfmInfo                    /* Status */
368 )
369 #else
370 S16 rlcDlUdxCfgCfm(pst, suId, status)
371 Pst           *pst;            /* post structure */
372 SuId          suId;            /* Service User Id */
373 RlcCfgCfmInfo *cfmInfo;        /* Status */
374 #endif
375 {
376    TRC3(rlcDlUdxCfgCfm)
377
378    /* jump to specific primitive depending on configured selector */
379    (*rlcDlUdxCfgCfmMt[pst->selector])(pst, suId, cfmInfo);
380
381    return ROK;
382
383 } /* end of rlcDlUdxBndCfm */
384
385 /**
386  *
387  * @brief 
388  *
389  *        Handler for confirming  the bind request received from KWU
390  *        interface.
391  *
392  * @b Description:
393  *
394  *        This function send the bind confirm primitive to the RLC user,
395  *        when it receives a bind request from its service user.
396  *
397  *  @param[in] pst     Post structure  
398  *  @param[in] suId    Service user SAP ID 
399  *  @param[in] status  Status of Confirmation 
400  *
401  *  @return  S16
402  *      -# ROK 
403  *
404  */
405 #ifdef ANSI
406 S16 rlcDlUdxUeIdChgCfm
407 (
408 Pst *pst,                       /* post structure */
409 SuId suId,                      /* Service User Id */
410 U32           transId,
411 CmStatus      status
412 )
413 #else
414 S16 rlcDlUdxUeIdChgCfm(pst, suId, status)
415 Pst           *pst;            /* post structure */
416 SuId          suId;            /* Service User Id */
417 U32           transId;
418 CmStatus      status;
419 #endif
420 {
421    TRC3(rlcDlUdxUeIdChgCfm)
422
423    /* jump to specific primitive depending on configured selector */
424    (*rlcDlUdxUeIdChgCfmMt[pst->selector])(pst, suId,transId,status);
425
426    return ROK;
427
428 } /* end of rlcDlUdxBndCfm */
429
430
431
432 #ifdef ANSI
433 S16 rlcDlUdxStaProhTmrStart
434 (
435 Pst                 *pst,                       /* post structure */
436 SuId                suId,                      /* Service User Id */
437 CmLteRlcId          *rlcId
438 )
439 #else
440 S16 rlcDlUdxStaProhTmrStart(pst, suId, rlcId)
441 Pst           *pst;            /* post structure */
442 SuId          suId;            /* Service User Id */
443 CmLteRlcId    *rlcId;
444 #endif
445 {
446    TRC3(rlcDlUdxStaProhTmrStart)
447
448    /* jump to specific primitive depending on configured selector */
449    (*rlcDlUdxStaProhTmrStartMt[pst->selector])(pst, suId, rlcId);
450
451    return ROK;
452
453 } /* end of rlcDlUdxBndCfm */
454
455 /**********************************************************************
456  
457          End of file
458 **********************************************************************/