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 */
61 /*********************************************************************
62 * Primitives for LKW interface
63 ********************************************************************/
64 /* Configuration confirmation primitive */
66 static RlcConfigCfm rlcMiRlcConfigCfmMt[MAXKWMI] =
69 packRlcConfigCfm, /* 0 - loosely coupled - fc */
70 #endif /* LCRLMILKW */
72 SmMiRlcConfigCfm, /* 1 - tightly coupled layer management*/
76 /* control confirmation primitives */
78 static LkwCntrlCfm kwMiLkwCntrlCfmMt[MAXKWMI] =
81 cmPkLkwCntrlCfm, /* 0 - loosely coupled - fc */
82 #endif /* LCRLMILKW */
84 SmMiLkwCntrlCfm, /* 1 - tightly coupled layer management*/
88 /* Status Indication primitive */
90 static LkwStaInd kwMiLkwStaIndMt[MAXKWMI] =
93 cmPkLkwStaInd, /* 0 - loosely coupled */
94 #endif /* LCKWMILKW */
96 SmMiLkwStaInd, /* 1 - tightly coupled, layer management */
100 /* Status confirm primitive */
102 static LkwStaCfm kwMiLkwStaCfmMt[MAXKWMI] =
105 cmPkLkwStaCfm, /* 0 - loosely coupled */
106 #endif /* LCKWMILKW */
108 SmMiLkwStaCfm, /* 1 - tightly coupled, layer management */
112 /* Statistics confirm primitive */
114 static LkwStsCfm kwMiLkwStsCfmMt[MAXKWMI] =
117 cmPkLkwStsCfm, /* 0 - loosely coupled */
118 #endif /* LCRLMILKW */
120 SmMiLkwStsCfm, /* 1 - tightly coupled, layer management */
124 /* Trace indication primitive */
126 static LkwTrcInd kwMiLkwTrcIndMt[MAXKWMI] =
129 cmPkLkwTrcInd, /* 0 - loosely coupled */
130 #endif /* LCKWMILKW */
132 SmMiLkwTrcInd, /* 1 - tightly coupled, layer management */
136 /* kw005.201 added support for L2 Measurement */
138 static const LkwL2MeasCfm rlcMiLkwL2MeasCfmMt[] =
147 static const LkwL2MeasStopCfm RlcMiLkwL2MeasStopCfmMt[] =
150 cmPkLkwL2MeasStopCfm,
153 SmMiLkwL2MeasStopCfm,
156 #endif /* LTE_L2_MEAS */
158 /****************************************************************************
159 * LKW Interface Mt functions
160 ***************************************************************************/
163 This function is called by the RlcMiRlcConfigReq function for responding
164 to configuration requests.The cfm field in the RlcMngmt structure contains
167 - This function calls the mapping matrix for sending the configuration
169 - The actual function called depends on the coupling at the LKW interface.
170 - For a loosely coupled interface, a common packing function is called.
171 - The packing function packs the parameter in a message buffer and posts
172 the message to the target task.
173 - For a tightly coupled interface, the actual function called depends on
174 the layer manager API provided.
178 S16 RlcMiRlcConfigCfm
180 Pst *pst, /* post structure */
181 RlcMngmt *cfm /* Layer Management structure */
184 S16 RlcMiRlcConfigCfm(pst, cfm)
185 Pst *pst; /* post structure */
186 RlcMngmt *cfm; /* Layer Management structure */
190 /* jump to specific primitive depending on configured selector */
191 (*rlcMiRlcConfigCfmMt[pst->selector])(pst, cfm);
199 This function is called by the RlcMiLkwCntrlReq function to send a control confirm to the layer management module.
201 - This function calls the mapping matrix for sending the control confirmation.
202 - Actual function called depends on the coupling of the LKW interface.
203 - For a loosely coupled interface, a common packing function is called.
204 - The packing function packs the parameter in a message buffer and posts the
205 message to the target task.
206 - For a tightly coupled interface, the actual function called depends on the
207 layer manager API provided.
213 Pst *pst, /* post structure */
214 RlcMngmt *cfm /* configure */
217 S16 RlcMiLkwCntrlCfm(pst, cfm)
218 Pst *pst; /* post structure */
219 RlcMngmt *cfm; /* confirm */
223 /* jump to specific primitive depending on configured selector */
224 (*kwMiLkwCntrlCfmMt[pst->selector])(pst, cfm);
228 } /* end of RlcMiLkwCntrlCfm */
233 - This function can be used by RLC to send unsolicited status information
234 to the layer manager, when the unsolicited status flag is enabled by the
235 layer manager through a previous control request.
237 - This function calls the mapping matrix for sending the unsolicited status
238 indication.The actual function called depends on the coupling of the
241 - For a loosely coupled interface, a common packing function is called. The
242 packing function packs the parameter in a message buffer and posts the
243 message to the target task.
245 - For a tightly coupled interface, the actual function called depends on
246 the layer manager API provided.
251 Pst *pst, /* post structure */
252 RlcMngmt *usta /* unsolicited status */
255 S16 RlcMiLkwStaInd(pst, usta)
256 Pst *pst; /* post structure */
257 RlcMngmt *usta; /* unsolicited status */
260 /* jump to specific primitive depending on configured selector */
261 (*kwMiLkwStaIndMt[pst->selector])(pst, usta);
264 } /* end of RlcMiLkwStaInd */
269 - This function is called by the RlcMiLkwStaReq function to send
270 the requested status information to the layer manager.
272 - This function calls the mapping matrix for sending the status
273 confirmation. The actual function called depends on the coupling
274 of the LKW interface.
276 - For a loosely coupled interface, a common packing function is called.
277 The packing function packs the parameter in a message buffer and
278 posts the message to the target task.
280 - For a tightly coupled interface, the actual function called depends
281 on the layer manager API provided.
287 Pst *pst, /* post structure */
288 RlcMngmt *cfm /* solicited status confirmation */
291 S16 RlcMiLkwStaCfm(pst, cfm)
292 Pst *pst; /* post structure */
293 RlcMngmt *cfm; /* solicited status confirmation */
297 /* jump to specific primitive depending on configured selector */
298 (*kwMiLkwStaCfmMt[pst->selector])(pst, cfm);
302 } /* end of RlcMiLkwStaCfm */
307 - This function is called by the RlcMiLkwStsReq function for responding
308 to statistics requests.
310 - This function calls the mapping matrix for sending the statistics
311 confirmation. The actual function called depends on the coupling
312 of the LKW interface.
314 - For a loosely coupled interface, a common packing function is called.
315 The packing function packs the parameter in a message buffer and
316 posts the message to the target task.
318 - For a tightly coupled interface, the actual function called depends
319 on the layer manager API provided.
325 Pst *pst, /* post structure */
326 Action action, /* action */
327 RlcMngmt *cfm /* statistics confirmation */
330 S16 RlcMiLkwStsCfm(pst, action, cfm)
331 Pst *pst; /* post structure */
332 Action action; /* action */
333 RlcMngmt *cfm; /* statistics confirmation */
336 /* jump to specific primitive depending on configured selector */
337 (*kwMiLkwStsCfmMt[pst->selector])(pst, action, cfm);
341 } /* end of RlcMiLkwStsCfm */
345 - This function can be used by RLC module to send unsolicited trace
346 indications to the layer manager, when tracing is enabled by the
347 layer manager through a previous control request.
349 - This function calls the mapping matrix for sending the trace indication.
350 The actual function called depends on the coupling of the LKW interface.
352 - For a loosely coupled interface, a common packing function is called.
353 The packing function packs the parameter in a message buffer and posts
354 the message to the target task.
356 - For a tightly coupled interface, the actual function called depends on
357 the layer manager API provided.
363 Pst *pst, /* post structure */
364 RlcMngmt *trc, /* trace indication */
365 Buffer *mBuf /* message buffer */
368 S16 RlcMiLkwTrcInd(pst, trc, mBuf)
369 Pst *pst; /* post structure */
370 RlcMngmt *trc; /* trace indication */
371 Buffer *mBuf; /* message buffer */
374 /* jump to specific primitive depending on configured selector */
375 (*kwMiLkwTrcIndMt[pst->selector])(pst, trc, mBuf);
379 } /* end of RlcMiLkwTrcInd */
382 /* kw005.201 added support for L2 Measurement */
385 S16 RlcMiLkwL2MeasCfm
388 RlcL2MeasCfmEvt *measEvt
391 S16 RlcMiLkwL2MeasCfm(pst, measEvt)
393 RlcL2MeasCfmEvt *measEvt;
397 (*rlcMiLkwL2MeasCfmMt[pst->selector])(pst, measEvt);
403 S16 RlcMiLkwL2MeasStopCfm
410 S16 RlcMiLkwL2MeasStopCfm(pst, measType,status)
417 (*RlcMiLkwL2MeasStopCfmMt[pst->selector])(pst, measType,status);
422 #endif /* LTE_L2_MEAS */
424 /********************************************************************30**
427 **********************************************************************/