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 /********************************************************************20**
21 Name: RLC Layer Management interface
25 Desc: This file contains source code for RLC layer management
26 interface primitives. It includes the definition of the
27 following functions and their portable function
36 *********************************************************************21*/
39 /* header (.h) include files */
40 #include "common_def.h"
41 #include "lkw.h" /* LKW defines */
42 #include "ckw.h" /* CKW defines */
43 #include "kwu.h" /* KWU defines */
44 #include "rgu.h" /* RGU defines */
46 #include "kw_env.h" /* RLC environment options */
47 #include "kw.h" /* RLC defines */
49 /* extern (.x) include files */
50 #include "lkw.x" /* LKW */
51 #include "ckw.x" /* CKW */
52 #include "kwu.x" /* KWU */
53 #include "rgu.x" /* RGU */
58 #define MAXKWMI 2 /* max. layer management interfaces */
72 /* portable functions */
74 PRIVATE S16 PtMiRlcConfigCfm ARGS((Pst *pst, RlcMngmt *cfm));
75 PRIVATE S16 PtMiLkwCntrlCfm ARGS((Pst *pst, RlcMngmt *cfm));
76 PRIVATE S16 PtMiLkwStaInd ARGS((Pst *pst, RlcMngmt *usta));
78 PRIVATE S16 PtMiLkwStaCfm ARGS((Pst *pst, RlcMngmt *cfm));
79 PRIVATE S16 PtMiLkwStsCfm ARGS((Pst *pst, Action action,
81 PRIVATE S16 PtMiLkwTrcInd ARGS((Pst *pst, RlcMngmt *trc,
83 /* kw005.201 added support for L2 Measurement */
85 PRIVATE S16 PtMiLkwL2MeasCfm ARGS((Pst *pst, RlcL2MeasCfmEvt *measEvt));
86 PRIVATE S16 PtMiLkwL2MeasStopCfm ARGS((Pst *pst, U8 measType,U8 status));
87 #endif /* LTE_L2_MEAS */
91 /*********************************************************************
92 * Primitives for LKW interface
93 ********************************************************************/
94 /* Configuration confirmation primitive */
96 PRIVATE RlcConfigCfm rlcMiRlcConfigCfmMt[MAXKWMI] =
99 packRlcConfigCfm, /* 0 - loosely coupled - fc */
101 PtMiRlcConfigCfm, /* 0 - tightly coupled portable */
102 #endif /* LCRLMILKW */
104 SmMiRlcConfigCfm, /* 1 - tightly coupled layer management*/
106 PtMiRlcConfigCfm, /* 1 - tightly coupled portable */
110 /* control confirmation primitives */
112 PRIVATE LkwCntrlCfm kwMiLkwCntrlCfmMt[MAXKWMI] =
115 cmPkLkwCntrlCfm, /* 0 - loosely coupled - fc */
117 PtMiLkwCntrlCfm, /* 0 - tightly coupled portable */
118 #endif /* LCRLMILKW */
120 SmMiLkwCntrlCfm, /* 1 - tightly coupled layer management*/
122 PtMiLkwCntrlCfm, /* 1 - tightly coupled portable */
126 /* Status Indication primitive */
128 PRIVATE LkwStaInd kwMiLkwStaIndMt[MAXKWMI] =
131 cmPkLkwStaInd, /* 0 - loosely coupled */
133 PtMiLkwStaInd, /* 0 - tightly coupled, portable */
134 #endif /* LCKWMILKW */
136 SmMiLkwStaInd, /* 1 - tightly coupled, layer management */
138 PtMiLkwStaInd, /* 1 - tightly coupled, portable */
142 /* Status confirm primitive */
144 PRIVATE LkwStaCfm kwMiLkwStaCfmMt[MAXKWMI] =
147 cmPkLkwStaCfm, /* 0 - loosely coupled */
149 PtMiLkwStaCfm, /* 0 - tightly coupled, portable */
150 #endif /* LCKWMILKW */
152 SmMiLkwStaCfm, /* 1 - tightly coupled, layer management */
154 PtMiLkwStaCfm, /* 1 - tightly coupled, portable */
158 /* Statistics confirm primitive */
160 PRIVATE LkwStsCfm kwMiLkwStsCfmMt[MAXKWMI] =
163 cmPkLkwStsCfm, /* 0 - loosely coupled */
165 PtMiLkwStsCfm, /* 0 - tightly coupled, portable */
166 #endif /* LCRLMILKW */
168 SmMiLkwStsCfm, /* 1 - tightly coupled, layer management */
170 PtMiLkwStsCfm, /* 1 - tightly coupled, portable */
174 /* Trace indication primitive */
176 PRIVATE LkwTrcInd kwMiLkwTrcIndMt[MAXKWMI] =
179 cmPkLkwTrcInd, /* 0 - loosely coupled */
181 PtMiLkwTrcInd, /* 0 - tightly coupled, portable */
182 #endif /* LCKWMILKW */
184 SmMiLkwTrcInd, /* 1 - tightly coupled, layer management */
186 PtMiLkwTrcInd, /* 1 - tightly coupled, portable */
190 /* kw005.201 added support for L2 Measurement */
192 PRIVATE CONSTANT LkwL2MeasCfm rlcMiLkwL2MeasCfmMt[] =
205 PRIVATE CONSTANT LkwL2MeasStopCfm RlcMiLkwL2MeasStopCfmMt[] =
208 cmPkLkwL2MeasStopCfm,
210 PtMiLkwL2MeasStopCfm,
213 SmMiLkwL2MeasStopCfm,
215 PtMiLkwL2MeasStopCfm,
218 #endif /* LTE_L2_MEAS */
220 /****************************************************************************
221 * LKW Interface Mt functions
222 ***************************************************************************/
225 This function is called by the RlcMiRlcConfigReq function for responding
226 to configuration requests.The cfm field in the RlcMngmt structure contains
229 - This function calls the mapping matrix for sending the configuration
231 - The actual function called depends on the coupling at the LKW interface.
232 - For a loosely coupled interface, a common packing function is called.
233 - The packing function packs the parameter in a message buffer and posts
234 the message to the target task.
235 - For a tightly coupled interface, the actual function called depends on
236 the layer manager API provided.
240 S16 RlcMiRlcConfigCfm
242 Pst *pst, /* post structure */
243 RlcMngmt *cfm /* Layer Management structure */
246 S16 RlcMiRlcConfigCfm(pst, cfm)
247 Pst *pst; /* post structure */
248 RlcMngmt *cfm; /* Layer Management structure */
251 TRC3(RlcMiRlcConfigCfm);
253 /* jump to specific primitive depending on configured selector */
254 (*rlcMiRlcConfigCfmMt[pst->selector])(pst, cfm);
262 This function is called by the RlcMiLkwCntrlReq function to send a control confirm to the layer management module.
264 - This function calls the mapping matrix for sending the control confirmation.
265 - Actual function called depends on the coupling of the LKW interface.
266 - For a loosely coupled interface, a common packing function is called.
267 - The packing function packs the parameter in a message buffer and posts the
268 message to the target task.
269 - For a tightly coupled interface, the actual function called depends on the
270 layer manager API provided.
276 Pst *pst, /* post structure */
277 RlcMngmt *cfm /* configure */
280 S16 RlcMiLkwCntrlCfm(pst, cfm)
281 Pst *pst; /* post structure */
282 RlcMngmt *cfm; /* confirm */
285 TRC3(RlcMiLkwCntrlCfm)
287 /* jump to specific primitive depending on configured selector */
288 (*kwMiLkwCntrlCfmMt[pst->selector])(pst, cfm);
292 } /* end of RlcMiLkwCntrlCfm */
297 - This function can be used by RLC to send unsolicited status information
298 to the layer manager, when the unsolicited status flag is enabled by the
299 layer manager through a previous control request.
301 - This function calls the mapping matrix for sending the unsolicited status
302 indication.The actual function called depends on the coupling of the
305 - For a loosely coupled interface, a common packing function is called. The
306 packing function packs the parameter in a message buffer and posts the
307 message to the target task.
309 - For a tightly coupled interface, the actual function called depends on
310 the layer manager API provided.
315 Pst *pst, /* post structure */
316 RlcMngmt *usta /* unsolicited status */
319 S16 RlcMiLkwStaInd(pst, usta)
320 Pst *pst; /* post structure */
321 RlcMngmt *usta; /* unsolicited status */
324 TRC3(RlcMiLkwStaInd);
326 /* jump to specific primitive depending on configured selector */
327 (*kwMiLkwStaIndMt[pst->selector])(pst, usta);
330 } /* end of RlcMiLkwStaInd */
335 - This function is called by the RlcMiLkwStaReq function to send
336 the requested status information to the layer manager.
338 - This function calls the mapping matrix for sending the status
339 confirmation. The actual function called depends on the coupling
340 of the LKW interface.
342 - For a loosely coupled interface, a common packing function is called.
343 The packing function packs the parameter in a message buffer and
344 posts the message to the target task.
346 - For a tightly coupled interface, the actual function called depends
347 on the layer manager API provided.
353 Pst *pst, /* post structure */
354 RlcMngmt *cfm /* solicited status confirmation */
357 S16 RlcMiLkwStaCfm(pst, cfm)
358 Pst *pst; /* post structure */
359 RlcMngmt *cfm; /* solicited status confirmation */
362 TRC3(RlcMiLkwStaCfm);
364 /* jump to specific primitive depending on configured selector */
365 (*kwMiLkwStaCfmMt[pst->selector])(pst, cfm);
369 } /* end of RlcMiLkwStaCfm */
374 - This function is called by the RlcMiLkwStsReq function for responding
375 to statistics requests.
377 - This function calls the mapping matrix for sending the statistics
378 confirmation. The actual function called depends on the coupling
379 of the LKW interface.
381 - For a loosely coupled interface, a common packing function is called.
382 The packing function packs the parameter in a message buffer and
383 posts the message to the target task.
385 - For a tightly coupled interface, the actual function called depends
386 on the layer manager API provided.
392 Pst *pst, /* post structure */
393 Action action, /* action */
394 RlcMngmt *cfm /* statistics confirmation */
397 S16 RlcMiLkwStsCfm(pst, action, cfm)
398 Pst *pst; /* post structure */
399 Action action; /* action */
400 RlcMngmt *cfm; /* statistics confirmation */
403 TRC3(RlcMiLkwStsCfm);
405 /* jump to specific primitive depending on configured selector */
406 (*kwMiLkwStsCfmMt[pst->selector])(pst, action, cfm);
410 } /* end of RlcMiLkwStsCfm */
414 - This function can be used by RLC module to send unsolicited trace
415 indications to the layer manager, when tracing is enabled by the
416 layer manager through a previous control request.
418 - This function calls the mapping matrix for sending the trace indication.
419 The actual function called depends on the coupling of the LKW interface.
421 - For a loosely coupled interface, a common packing function is called.
422 The packing function packs the parameter in a message buffer and posts
423 the message to the target task.
425 - For a tightly coupled interface, the actual function called depends on
426 the layer manager API provided.
432 Pst *pst, /* post structure */
433 RlcMngmt *trc, /* trace indication */
434 Buffer *mBuf /* message buffer */
437 S16 RlcMiLkwTrcInd(pst, trc, mBuf)
438 Pst *pst; /* post structure */
439 RlcMngmt *trc; /* trace indication */
440 Buffer *mBuf; /* message buffer */
443 TRC3(RlcMiLkwTrcInd);
445 /* jump to specific primitive depending on configured selector */
446 (*kwMiLkwTrcIndMt[pst->selector])(pst, trc, mBuf);
450 } /* end of RlcMiLkwTrcInd */
453 /* kw005.201 added support for L2 Measurement */
456 S16 RlcMiLkwL2MeasCfm
459 RlcL2MeasCfmEvt *measEvt
462 S16 RlcMiLkwL2MeasCfm(pst, measEvt)
464 RlcL2MeasCfmEvt *measEvt;
468 TRC3(RlcMiLkwL2MeasCfm)
470 (*rlcMiLkwL2MeasCfmMt[pst->selector])(pst, measEvt);
476 S16 RlcMiLkwL2MeasStopCfm
483 S16 RlcMiLkwL2MeasStopCfm(pst, measType,status)
490 TRC3(RlcMiLkwL2MeasStopCfm)
492 (*RlcMiLkwL2MeasStopCfmMt[pst->selector])(pst, measType,status);
497 #endif /* LTE_L2_MEAS */
501 /*************************************************************************
503 ************************************************************************/
506 * Fun: configuration Confirm
508 * Desc: This function is used to confirm the receipt of configuration
509 * request from layer management.
522 Pst *pst, /* post structure */
523 RlcMngmt *cfm /* Layer Management structure */
526 S16 PtMiRlcConfigCfm(pst, cfm)
527 Pst *pst; /* post structure */
528 RlcMngmt *cfm; /* Layer Management structure */
531 TRC3(PtMiRlcConfigCfm)
536 TRC2(PtMiRlcConfigCfm() : function is not implemented)
539 } /* end of PtMiRlcConfigCfm */
543 * Fun: Control Confirmation
545 * Desc: This function is the portable version of used to
546 * confirm the receipt of configuration request from
558 PRIVATE S16 PtMiLkwCntrlCfm
560 Pst *pst, /* Post structure */
561 RlcMngmt *cfm /* Layer Management structure */
564 PRIVATE S16 PtMiLkwCntrlCfm(pst, cfm)
565 Pst *pst; /* Post structure */
566 RlcMngmt *cfm; /* Layer Management structure */
569 TRC3(PtMiLkwCntrlCfm);
574 TRC2(PtMiLkwCntrlCfm() : function is not implemented)
577 } /* end of PtMiLkwCntrlCfm */
582 * Fun: unsolicited status indication
584 * Desc: This function is the portable version used to
585 * send the status indication to the layer manager
595 PRIVATE S16 PtMiLkwStaInd
597 Pst *pst, /* post structure */
598 RlcMngmt *usta /* unsolicited status */
601 PRIVATE S16 PtMiLkwStaInd(pst, usta)
602 Pst *pst; /* post structure */
603 RlcMngmt *usta; /* unsolicited status */
611 TRC2(PtMiLkwStaInd() : function is not implemented)
614 } /* end of PtMiLkwStaInd */
619 * Fun: portable function for solicited status confirmation
621 * Desc: This function is the portable version used to
622 * send the status confirmation to the layer manager
632 PRIVATE S16 PtMiLkwStaCfm
634 Pst *pst, /* post structure */
635 RlcMngmt *cfm /* solicited status confirmation */
638 PRIVATE S16 PtMiLkwStaCfm(pst, cfm)
639 Pst *pst; /* post structure */
640 RlcMngmt *cfm; /* solicited status confirmation */
649 } /* end of PtMiLkwStaCfm */
654 * Fun: portable function for statistics confirmation
656 * Desc: This function is the portable version used to
657 * send the statistics confirmation to the layer manager
667 PRIVATE S16 PtMiLkwStsCfm
669 Pst *pst, /* post structure */
670 Action action, /* action */
671 RlcMngmt *cfm /* statistics confirmation */
674 PRIVATE S16 PtMiLkwStsCfm(pst, action, cfm)
675 Pst *pst; /* post structure */
676 Action action; /* action */
677 RlcMngmt *cfm; /* statistics confirmation */
687 } /* end of PtMiLkwStsCfm */
692 * Fun: portable function for trace indication
694 * Desc: This function is the portable version used to
695 * send trace indication to the layer manager
705 PRIVATE S16 PtMiLkwTrcInd
707 Pst *pst, /* post structure */
708 RlcMngmt *trc, /* trace indication */
709 Buffer *mBuf /* message buffer */
712 PRIVATE S16 PtMiLkwTrcInd(pst, trc, mBuf)
713 Pst *pst; /* post structure */
714 RlcMngmt *trc; /* trace indication */
715 Buffer *mBuf; /* message buffer */
725 } /* end of PtMiLkwTrcInd */
727 /* kw005.201 added support for L2 Measurement */
730 PRIVATE S16 PtMiLkwL2MeasCfm
733 RlcL2MeasCfmEvt * measEvt
736 PRIVATE S16 PtMiLkwL2MeasCfm(pst, measEvt)
738 RlcL2MeasCfmEvt * measEvt;
742 TRC3(PtMiLkwL2MeasCfm)
751 PRIVATE S16 PtMiLkwL2MeasStopCfm
758 PRIVATE S16 PtMiLkwL2MeasStopCfm(pst, measType,status)
765 TRC3(PtMiLkwL2MeasStopCfm)
774 #endif /* LTE_L2_MEAS */
778 /********************************************************************30**
781 **********************************************************************/