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 PtMiLkwCfgCfm ARGS((Pst *pst, KwMngmt *cfm));
75 PRIVATE S16 PtMiLkwCntrlCfm ARGS((Pst *pst, KwMngmt *cfm));
76 PRIVATE S16 PtMiLkwStaInd ARGS((Pst *pst, KwMngmt *usta));
78 PRIVATE S16 PtMiLkwStaCfm ARGS((Pst *pst, KwMngmt *cfm));
79 PRIVATE S16 PtMiLkwStsCfm ARGS((Pst *pst, Action action,
81 PRIVATE S16 PtMiLkwTrcInd ARGS((Pst *pst, KwMngmt *trc,
83 /* kw005.201 added support for L2 Measurement */
85 PRIVATE S16 PtMiLkwL2MeasCfm ARGS((Pst *pst, KwL2MeasCfmEvt *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 LkwCfgCfm kwMiLkwCfgCfmMt[MAXKWMI] =
99 cmPkLkwCfgCfm, /* 0 - loosely coupled - fc */
101 PtMiLkwCfgCfm, /* 0 - tightly coupled portable */
102 #endif /* LCRLMILKW */
104 SmMiLkwCfgCfm, /* 1 - tightly coupled layer management*/
106 PtMiLkwCfgCfm, /* 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 KwMiLkwL2MeasCfmMt[] =
205 PRIVATE CONSTANT LkwL2MeasStopCfm KwMiLkwL2MeasStopCfmMt[] =
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 KwMiLkwCfgReq function for responding
226 to configuration requests.The cfm field in the KwMngmt 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 PUBLIC S16 KwMiLkwCfgCfm
242 Pst *pst, /* post structure */
243 KwMngmt *cfm /* Layer Management structure */
246 PUBLIC S16 KwMiLkwCfgCfm(pst, cfm)
247 Pst *pst; /* post structure */
248 KwMngmt *cfm; /* Layer Management structure */
253 /* jump to specific primitive depending on configured selector */
254 (*kwMiLkwCfgCfmMt[pst->selector])(pst, cfm);
262 This function is called by the KwMiLkwCntrlReq 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.
274 PUBLIC S16 KwMiLkwCntrlCfm
276 Pst *pst, /* post structure */
277 KwMngmt *cfm /* configure */
280 PUBLIC S16 KwMiLkwCntrlCfm(pst, cfm)
281 Pst *pst; /* post structure */
282 KwMngmt *cfm; /* confirm */
285 TRC3(KwMiLkwCntrlCfm)
287 /* jump to specific primitive depending on configured selector */
288 (*kwMiLkwCntrlCfmMt[pst->selector])(pst, cfm);
292 } /* end of KwMiLkwCntrlCfm */
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.
313 PUBLIC S16 KwMiLkwStaInd
315 Pst *pst, /* post structure */
316 KwMngmt *usta /* unsolicited status */
319 PUBLIC S16 KwMiLkwStaInd(pst, usta)
320 Pst *pst; /* post structure */
321 KwMngmt *usta; /* unsolicited status */
326 /* jump to specific primitive depending on configured selector */
327 (*kwMiLkwStaIndMt[pst->selector])(pst, usta);
330 } /* end of KwMiLkwStaInd */
335 - This function is called by the KwMiLkwStaReq 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.
351 PUBLIC S16 KwMiLkwStaCfm
353 Pst *pst, /* post structure */
354 KwMngmt *cfm /* solicited status confirmation */
357 PUBLIC S16 KwMiLkwStaCfm(pst, cfm)
358 Pst *pst; /* post structure */
359 KwMngmt *cfm; /* solicited status confirmation */
364 /* jump to specific primitive depending on configured selector */
365 (*kwMiLkwStaCfmMt[pst->selector])(pst, cfm);
369 } /* end of KwMiLkwStaCfm */
374 - This function is called by the KwMiLkwStsReq 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.
390 PUBLIC S16 KwMiLkwStsCfm
392 Pst *pst, /* post structure */
393 Action action, /* action */
394 KwMngmt *cfm /* statistics confirmation */
397 PUBLIC S16 KwMiLkwStsCfm(pst, action, cfm)
398 Pst *pst; /* post structure */
399 Action action; /* action */
400 KwMngmt *cfm; /* statistics confirmation */
405 /* jump to specific primitive depending on configured selector */
406 (*kwMiLkwStsCfmMt[pst->selector])(pst, action, cfm);
410 } /* end of KwMiLkwStsCfm */
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.
430 PUBLIC S16 KwMiLkwTrcInd
432 Pst *pst, /* post structure */
433 KwMngmt *trc, /* trace indication */
434 Buffer *mBuf /* message buffer */
437 PUBLIC S16 KwMiLkwTrcInd(pst, trc, mBuf)
438 Pst *pst; /* post structure */
439 KwMngmt *trc; /* trace indication */
440 Buffer *mBuf; /* message buffer */
445 /* jump to specific primitive depending on configured selector */
446 (*kwMiLkwTrcIndMt[pst->selector])(pst, trc, mBuf);
450 } /* end of KwMiLkwTrcInd */
453 /* kw005.201 added support for L2 Measurement */
456 PUBLIC S16 KwMiLkwL2MeasCfm
459 KwL2MeasCfmEvt *measEvt
462 PUBLIC S16 KwMiLkwL2MeasCfm(pst, measEvt)
464 KwL2MeasCfmEvt *measEvt;
468 TRC3(KwMiLkwL2MeasCfm)
470 (*KwMiLkwL2MeasCfmMt[pst->selector])(pst, measEvt);
476 PUBLIC S16 KwMiLkwL2MeasStopCfm
483 PUBLIC S16 KwMiLkwL2MeasStopCfm(pst, measType,status)
490 TRC3(KwMiLkwL2MeasStopCfm)
492 (*KwMiLkwL2MeasStopCfmMt[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.
520 PUBLIC S16 PtMiLkwCfgCfm
522 Pst *pst, /* post structure */
523 KwMngmt *cfm /* Layer Management structure */
526 PUBLIC S16 PtMiLkwCfgCfm(pst, cfm)
527 Pst *pst; /* post structure */
528 KwMngmt *cfm; /* Layer Management structure */
536 TRC2(PtMiLkwCfgCfm() : function is not implemented)
539 } /* end of PtMiLkwCfgCfm */
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 KwMngmt *cfm /* Layer Management structure */
564 PRIVATE S16 PtMiLkwCntrlCfm(pst, cfm)
565 Pst *pst; /* Post structure */
566 KwMngmt *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 KwMngmt *usta /* unsolicited status */
601 PRIVATE S16 PtMiLkwStaInd(pst, usta)
602 Pst *pst; /* post structure */
603 KwMngmt *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 KwMngmt *cfm /* solicited status confirmation */
638 PRIVATE S16 PtMiLkwStaCfm(pst, cfm)
639 Pst *pst; /* post structure */
640 KwMngmt *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 KwMngmt *cfm /* statistics confirmation */
674 PRIVATE S16 PtMiLkwStsCfm(pst, action, cfm)
675 Pst *pst; /* post structure */
676 Action action; /* action */
677 KwMngmt *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 KwMngmt *trc, /* trace indication */
709 Buffer *mBuf /* message buffer */
712 PRIVATE S16 PtMiLkwTrcInd(pst, trc, mBuf)
713 Pst *pst; /* post structure */
714 KwMngmt *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 KwL2MeasCfmEvt * measEvt
736 PRIVATE S16 PtMiLkwL2MeasCfm(pst, measEvt)
738 KwL2MeasCfmEvt * 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 **********************************************************************/