replaced cmMemSet, cmMemcpy with memset and memcpy resp AND Removed TRC() traces...
[o-du/l2.git] / src / 5gnrmac / rg_ptui.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 Upper Interface Module 
26   
27      File:     rg_ptui.c 
28   
29 **********************************************************************/
30
31 /** @file rg_ptui.c
32 @brief This file contains the definitions for Upper Interface(RGR/CRG/RGU) 
33        primitives that are invoked from MAC to its service users.
34        Portable functions corresponding to these primitives are also defined.
35 */
36 /* header include files (.h) */
37 #include "common_def.h"
38 #include "rg_env.h"        /* MAC Environment Defines */
39 #include "crg.h"           /* CRG Interface defines */
40 #include "rgr.h"           /* RGR Interface defines */
41 #include "rgu.h"           /* RGU Interface defines */
42 #include "rgm.h"           /* RGM Interface defines*/
43
44 /* header/extern include files (.x) */
45 #include "crg.x"           /* CRG Interface includes */
46 #include "rgr.x"           /* RGR Interface includes */
47 #include "rgu.x"           /* RGU Interface includes */
48 #include "rgm.x"           /* RGM Interface includes*/
49 #include "ss_rbuf.h"
50 #include "ss_rbuf.x"
51
52 #ifdef __cplusplus
53 extern "C" {
54 #endif /* __cplusplus */
55
56 #if !(defined(LCRGUIRGU) && defined(LWLCRGUIRGU)  && defined(KW))
57 #define PTRGUIRGU
58 #endif
59
60 #if !(defined(LCRGUICRG)  && defined(NH))
61 #define PTRGUICRG
62 #endif
63
64 #if !(defined(LCRGUIRGR)  && defined(NX))
65 #define PTRGUIRGR
66 #endif
67
68 #if !(defined(LCRGUIRGM)  && defined(RM))
69 #define PTRGUIRGM
70 #endif
71
72 /* MAX Number of Service Users of RG */
73 #define RG_MAX_RGU_USR   3
74
75 /* MAX Number of Service Users of RG */
76 #define RG_MAX_CRG_USR   2
77
78 /* MAX Number of Service Users of RG */
79 #define RG_MAX_RGR_USR   2
80
81 /* MAX Number of Service Users of RG */
82 #define RG_MAX_RGM_USR   2
83 #ifdef PTRGUIRGU
84 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
85  * request for the interface saps */
86 EXTERN S16 PtUiRguBndCfm ARGS((Pst* pst, SuId suId, U8 status));
87 /** @brief Data Indication from MAC to RLC to 
88  * forward the data received for common channels*/
89 EXTERN S16 PtUiRguCDatInd ARGS((Pst* pst, SuId suId, RguCDatIndInfo  * datInd));
90 /** @brief Data Indication from MAC to RLC to 
91  * forward the data received for dedicated channels*/
92 EXTERN S16 PtUiRguDDatInd ARGS((Pst* pst, SuId suId, RguDDatIndInfo  * datInd));
93 /** @brief Status Indication from MAC to RLC  
94  * as a response to the staRsp primitive from RLC.
95  * Informs RLC of the totalBufferSize and Timing Info 
96  * for the transmission on common channels. */
97 EXTERN S16 PtUiRguCStaInd ARGS((Pst* pst, SuId suId, RguCStaIndInfo  * staInd));
98 /** @brief Status Indication from MAC to RLC  
99  * as a response to the staRsp primitive from RLC.
100  * Informs RLC of the totalBufferSize and Timing Info 
101  * for the transmission on dedicated channels. */
102 EXTERN S16 PtUiRguDStaInd ARGS((Pst* pst, SuId suId, RguDStaIndInfo  * staInd));
103 #ifdef LTE_L2_MEAS
104 /**@brief HARQ Status Indication from MAC to RLC */
105 EXTERN S16 PtUiRguHqStaInd ARGS((Pst* pst,SuId suId,
106          RguHarqStatusInd *harqStatusInd));
107 #endif
108 /**@brief PDB FLow Control Indication from MAC to RLC */
109 EXTERN S16 PtUiRguFlowCntrlInd ARGS((Pst* pst,SuId suId,
110          RguFlowCntrlInd *flowCntrlInd));
111 #endif /*--#ifdef PTRGUIRGU--*/
112 S16 RgUiRguFlowCntrlInd(Pst* pst, SuId suId, RguFlowCntrlInd *flowCntrlInd);
113 #ifdef LTE_L2_MEAS
114 #ifdef MAC_RLC_HARQ_STA_RBUF
115 S16 RgUiRguHqStaIndRbuf ARGS((Pst* pst,SuId suId,RguHarqStatusInd *harqStatusInd));
116 #endif 
117 #endif
118
119 #if defined(MAC_RLC_UL_RBUF) && !defined(SS_RBUF)
120 PRIVATE S16  RgUiRguDDatIndRbuf ARGS((RguDDatIndInfo  *datInd));
121 #endif
122 EXTERN Void rgFreeSharableSBuf ARGS((Data **data, Size size));
123
124 #ifdef RGR_CQI_REPT 
125 EXTERN S16 PtUiRgrStaInd ARGS(( Pst* pst, SuId suId, RgrStaIndInfo *staInd));
126 #endif
127 /* LTE_ADV_FLAG_REMOVED_START */
128 EXTERN S16 PtUiRgrLoadInfInd ARGS(( Pst* pst, SuId suId, RgrLoadInfIndInfo *loadInfInd));
129 /* LTE_ADV_FLAG_REMOVED_END */
130 EXTERN S16 PtUiRgrUeStaInd ARGS
131 ((
132 Pst* pst, 
133 SuId suId, 
134 RgrUeStaIndInfo *staInd
135 ));
136 #ifdef PTRGUICRG
137 /** @brief Confirmation from MAC to RRC for the bind/Unbind 
138  * request for the interface saps */
139 EXTERN S16 PtUiCrgBndCfm ARGS((Pst* pst, SuId suId, U8 status));
140 /** @brief Configuration Confirm from MAC to RRC */
141 EXTERN S16 PtUiCrgCfgCfm ARGS((Pst* pst, SuId suId, CrgCfgTransId transId, U8 status));
142 #endif /*--#ifdef PTRGUICRG--*/
143
144 #ifdef PTRGUIRGR
145 /** @brief Confirmation from MAC to RRM for the bind/Unbind 
146  * request for the interface saps */
147 EXTERN S16 PtUiRgrBndCfm ARGS((Pst* pst, SuId suId, U8 status));
148 /** @brief Configuration Confirm from MAC to RRM */
149 EXTERN S16 PtUiRgrCfgCfm ARGS((Pst* pst, SuId suId, RgrCfgTransId transId, U8 status));
150 EXTERN S16 PtUiRgrTtiInd ARGS((Pst* pst, SuId suId, RgrTtiIndInfo *ttiInd));
151 /* Added for SI Enhancement*/
152 #ifdef RGR_SI_SCH
153 EXTERN S16 PtUiRgrSiCfgCfm ARGS((Pst* pst, SuId suId, RgrCfgTransId transId, U8 status));
154 EXTERN S16 PtUiRgrWarningSiCfgCfm ARGS((Pst* pst, SuId suId, 
155                                 RgrCfgTransId transId, U8 siId, U8 status));
156 #endif/*RGR_SI_SCH*/
157 #endif /*--#ifdef PTRGUIRGR--*/
158
159 #ifdef PTRGUIRGM
160 S16 PtUiRgmPrbRprtInd ARGS((Pst* pst, SuId suId, RgmPrbRprtInd *prbRprtInd));
161 S16 PtUiRgmBndCfm ARGS((Pst* pst, SuId suId, U8 status));
162 S16 PtUiRgmTransModeInd  ARGS((Pst* pst, SuId suId, RgmTransModeInd *transModeInd));
163 #endif
164 S16 RgUiRgmSendPrbRprtInd ARGS((Pst* pst, SuId suId, RgmPrbRprtInd *prbRprtInd));
165 S16 RgUiRgmChangeTransModeInd ARGS((Pst* pst, SuId suId, RgmTransModeInd *transModeInd));
166
167 S16 RgUiRguFlowCntrlInd ARGS((Pst* pst, SuId suId, RguFlowCntrlInd *flowCntrlInd));
168 /* Added for sending TTI tick to RRM */
169 /** @brief TTI indication from MAC to RRM */
170 PRIVATE CONSTANT RgrTtiInd RgUiRgrTtiIndMt[RG_MAX_RGR_USR] =
171 {
172 #ifdef LCRGUIRGR
173    cmPkRgrTtiInd,
174 #else
175    PtUiRgrTtiInd,
176 #endif
177 #ifdef NX
178    NxLiRgrTtiInd,
179 #else
180    PtUiRgrTtiInd,
181 #endif
182 };
183
184
185 /** @brief Confirmation from MAC to RRM for the bind/Unbind 
186  * request for the interface saps */
187 PRIVATE CONSTANT RgrBndCfm RgUiRgrBndCfmMt[RG_MAX_RGR_USR] =
188 {
189 #ifdef LCRGUIRGR
190    cmPkRgrBndCfm,
191 #else
192    PtUiRgrBndCfm,
193 #endif
194 #ifdef NX
195    NxLiRgrBndCfm,
196 #else
197    PtUiRgrBndCfm,
198 #endif
199 };
200
201 /** @brief Confirmation from MAC to RRM for the bind/Unbind 
202  * request for the interface saps  via RGM interface*/
203 PRIVATE CONSTANT RgmBndCfm RgUiRgmBndCfmMt[RG_MAX_RGM_USR] =
204 {
205 #ifdef RGM_LC
206    cmPkRgmBndCfm,
207 #else
208    PtUiRgmBndCfm,
209 #endif
210 #ifdef RM
211    RmLiRgmBndCfm, /*To be added by RRM*/
212 #else
213    PtUiRgmBndCfm,
214 #endif
215 };
216
217
218 /** @brief Configuration Confirm from MAC to RRM */
219 PRIVATE CONSTANT RgrCfgCfm RgUiRgrCfgCfmMt[RG_MAX_RGR_USR] =
220 {
221 #ifdef LCRGUIRGR
222    cmPkRgrCfgCfm,
223 #else
224    PtUiRgrCfgCfm,
225 #endif
226 #ifdef NX
227    NxLiRgrCfgCfm,
228 #endif
229 };
230
231 /* Added for SI Enhancement*/
232 #ifdef RGR_SI_SCH
233 /** @brief SI Configuration Confirm from MAC to RRM */
234 PRIVATE CONSTANT RgrSiCfgCfm RgUiRgrSiCfgCfmMt[RG_MAX_RGR_USR] =
235 {
236 #ifdef LCRGUIRGR
237    cmPkRgrSiCfgCfm,
238 #else
239    PtUiRgrSiCfgCfm,
240 #endif
241 #ifdef NX
242    NxLiRgrSiCfgCfm,
243 #else
244    PtUiRgrSiCfgCfm,
245 #endif
246 };
247
248
249 /** @brief Warning SI Configuration Confirm from MAC to RRM */
250 PRIVATE CONSTANT RgrWarningSiCfgCfm RgUiRgrWarningSiCfgCfmMt[RG_MAX_RGR_USR] =
251 {
252 #ifdef LCRGUIRGR
253    cmPkRgrWarningSiCfgCfm,
254 #else
255    PtUiRgrWarningSiCfgCfm,
256 #endif
257 #ifdef NX
258    NxLiRgrWarningSiCfgCfm,
259 #else
260    PtUiRgrWarningSiCfgCfm,
261 #endif
262 };
263
264 #endif/*RGR_SI_SCH */
265 /** @brief Confirmation from MAC to RRC for the bind/Unbind 
266  * request for the interface saps */
267 PRIVATE CONSTANT CrgBndCfm RgUiCrgBndCfmMt[RG_MAX_CRG_USR] =
268 {
269 #ifdef LCRGUICRG
270    cmPkCrgBndCfm,
271 #else
272    PtUiCrgBndCfm,
273 #endif
274 #ifdef NH
275    NhLiCrgBndCfm,
276 #else
277    PtUiCrgBndCfm,
278 #endif
279 };
280
281 /** @brief Configuration Confirm from MAC to RRC */
282 PRIVATE CONSTANT CrgCfgCfm RgUiCrgCfgCfmMt[RG_MAX_CRG_USR] =
283 {
284 #ifdef LCRGUICRG
285    cmPkCrgCfgCfm,
286 #else
287    PtUiCrgCfgCfm,
288 #endif
289 #ifdef NH
290    NhLiCrgCfgCfm,
291 #else
292    PtUiCrgCfgCfm,
293 #endif
294 };
295
296
297 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
298  * request for the interface saps */
299 PRIVATE CONSTANT RguBndCfm RgUiRguBndCfmMt[RG_MAX_RGU_USR] =
300 {
301 #ifdef LCRGUIRGU
302    cmPkRguBndCfm,
303 #else
304    PtUiRguBndCfm,
305 #endif
306 #ifdef KW
307    RlcLiRguBndCfm,
308 #else
309    PtUiRguBndCfm,
310 #endif
311 #ifdef LWLCRGUIRGU
312    cmPkRguBndCfm,
313 #else
314    PtUiRguBndCfm,
315 #endif
316 };
317
318 /** @brief Data Indication from MAC to RLC to 
319  * forward the data received for common channels*/
320 PRIVATE CONSTANT RguCDatInd RgUiRguCDatIndMt[RG_MAX_RGU_USR] =
321 {
322 #ifdef LCRGUIRGU
323 //   cmPkRguCDatInd, /* TODO : Call packRcvdUlData instead */
324 #else
325    PtUiRguCDatInd,
326 #endif
327 #ifdef KW
328    //RlcProcCommLcUlData,
329 #else
330    PtUiRguCDatInd,
331 #endif
332 #ifdef LWLCRGUIRGU
333 //   cmPkRguCDatInd, /* TODO:Call packRcvdUlData instead */
334 #else
335    PtUiRguCDatInd,
336 #endif
337 };
338
339 /** @brief Data Indication from MAC to RLC to 
340  * forward the data received for dedicated channels*/
341 PRIVATE CONSTANT RguDDatInd RgUiRguDDatIndMt[RG_MAX_RGU_USR] =
342 {
343 #ifdef LCRGUIRGU
344 //   cmPkRguDDatInd,  /* TODO: Call packRcvdUlData instead */
345 #else
346    PtUiRguDDatInd,
347 #endif
348 #ifdef KW
349    //RlcProcDedLcUlData,
350 #else
351    PtUiRguDDatInd,
352 #endif
353 #ifdef LWLCRGUIRGU
354 //   cmPkRguDDatInd, /* TODO: Call packRcvdUlData instead */
355 #else
356    PtUiRguDDatInd,
357 #endif
358 };
359
360 /** @brief Status Indication from MAC to RLC  
361  * as a response to the staRsp primitive from RLC.
362  * Informs RLC of the totalBufferSize and Timing Info 
363  * for the transmission on common channels. */
364 PRIVATE CONSTANT RguCStaInd RgUiRguCStaIndMt[RG_MAX_RGU_USR] =
365 {
366 #ifdef LCRGUIRGU
367    //cmPkRguCStaInd, /* TODO: Call packSchedRep instead of cmPkRguCStaInd */
368 #else
369    PtUiRguCStaInd,
370 #endif
371 #ifdef KW
372    //RlcMacProcSchedRep,
373 #else
374    PtUiRguCStaInd,
375 #endif
376 #ifdef LWLCRGUIRGU
377    //cmPkRguCStaInd, /* TODO: Call packSchedRep instead of cmPkRguCStaInd */
378 #else
379    PtUiRguCStaInd,
380 #endif
381 };
382
383 /** @brief Status Indication from MAC to RLC  
384  * as a response to the staRsp primitive from RLC.
385  * Informs RLC of the totalBufferSize and Timing Info 
386  * for the transmission on dedicated channels. */
387 PRIVATE CONSTANT RguDStaInd RgUiRguDStaIndMt[RG_MAX_RGU_USR] =
388 {
389 #ifdef LCRGUIRGU
390    //cmPkRguDStaInd, /* TODO: Call packSchedRep instead of cmPkRguDStaInd */
391 #else
392    PtUiRguDStaInd,
393 #endif
394 #ifdef KW
395    //RlcMacProcSchedRep,
396 #else
397    PtUiRguDStaInd,
398 #endif
399 #ifdef LWLCRGUIRGU
400    //cmPkRguDStaInd, /* TODO: Call packSchedRep instead of cmPkRguDStaInd */
401 #else
402    PtUiRguDStaInd,
403 #endif
404 };
405
406 #ifdef LTE_L2_MEAS
407 /** @brief HARQ Status Indication from MAC to RLC  
408  * as a response to the DdatReq primitive from RLC.
409  * Informs RLC of the successful transmission of TB's 
410  * (ACK/NACK) along with Mapping Info. */
411 PRIVATE CONSTANT RguHqStaInd RgUiRguHqStaIndMt[RG_MAX_RGU_USR] =
412 {
413 #ifdef LCRGUIRGU
414    cmPkRguHqStaInd,
415 #else
416    PtUiRguHqStaInd,
417 #endif
418 #ifdef KW
419    RlcLiRguHqStaInd,
420 #else
421    PtUiRguHqStaInd,
422 #endif
423 #ifdef LWLCRGUIRGU
424    cmPkRguHqStaInd,
425 #else
426    PtUiRguHqStaInd,
427 #endif
428 };
429 #endif /* LTE_L2_MEAS */
430
431 /* ccpu00117452 - MOD - Changed macro name from
432    RGR_RRM_DLPWR_CNTRL to RGR_CQI_REPT */
433 #ifdef RGR_CQI_REPT
434 /** @brief TTI indication from MAC to RRM */
435 PRIVATE CONSTANT RgrStaInd RgUiRgrStaIndMt[RG_MAX_RGR_USR] =
436 {
437 #ifdef LCRGUIRGR
438    cmPkRgrStaInd,
439 #else
440    PtUiRgrStaInd,
441 #endif
442 #ifdef NX
443    NxLiRgrStaInd,
444 #else
445    PtUiRgrStaInd,
446 #endif
447 };
448 #endif /* RGR_CQI_REPT */
449
450 /* LTE_ADV_FLAG_REMOVED_START */
451 /** @brief LOAD INF indication from MAC to RRM */
452 PRIVATE CONSTANT RgrLoadInfInd RgUiRgrLoadInfIndMt[RG_MAX_RGR_USR] =
453 {
454 #ifdef LCRGUIRGR
455    cmPkRgrLoadInfInd,
456 #else
457    PtUiRgrLoadInfInd,
458 #endif
459 #ifdef NX
460    NxLiRgrLoadInfInd,
461 #else
462    PtUiRgrLoadInfInd,
463 #endif
464 };
465 /* LTE_ADV_FLAG_REMOVED_END */
466
467 /** @brief TTI indication from MAC to RRM */
468 PRIVATE CONSTANT RgrUeStaInd RgUiRgrUeStaIndMt[RG_MAX_RGR_USR] =
469 {
470 #ifdef LCRGUIRGR
471    cmPkRgrUeStaInd,
472 #else
473    PtUiRgrUeStaInd,
474 #endif
475 #ifdef NX
476    NxLiRgrUeStaInd,
477 #else
478    PtUiRgrUeStaInd,
479 #endif
480 };
481
482 /** @brief Average PRB usage indication from MAC to RRM */
483 PRIVATE CONSTANT RgmPrbRprtIndFptr RgUiRgmSendPrbRprtIndMt[RG_MAX_RGM_USR] =
484 {
485 #ifdef RGM_LC
486    cmPkRgmPrbRprtInd,
487 #else
488    PtUiRgmPrbRprtInd,
489 #endif
490 #ifdef RM
491    RmLiRgmPrbRprtInd,
492 #else
493    PtUiRgmPrbRprtInd,
494 #endif
495 };
496
497
498 /** @brief Transmission Mode Change indication from MAC to RRM */
499 PRIVATE CONSTANT RgmTransModeIndFptr RgUiRgmChangeTransModeIndMt[RG_MAX_RGM_USR] =
500 {
501 #ifdef RGM_LC
502    cmPkRgmTransModeInd,
503 #else
504    PtUiRgmTransModeInd,
505 #endif
506 #ifdef RM
507    RmLiRgmTransModeInd,
508 #else
509    PtUiRgmTransModeInd,
510 #endif
511 };
512
513 PRIVATE CONSTANT RguFlowCntrlIndInfo RgUiRguFlowCntrlIndMt[RG_MAX_RGU_USR] =
514 {
515 #ifdef LCRGUIRGU
516    cmPkRguFlowCntrlInd,
517 #else
518    PtUiRguFlowCntrlInd,
519 #endif
520 #ifdef KW
521    RlcLiRguFlowCntrlInd,
522 #else
523    PtUiRguFlowCntrlInd,
524 #endif
525 #ifdef LWLCRGUIRGU
526    cmPkRguFlowCntrlInd,
527 #else
528    PtUiRguFlowCntrlInd,
529 #endif
530 };
531 #ifdef __cplusplus
532 }
533 #endif /* __cplusplus */
534
535 #ifdef RG
536 \f
537 /**
538 * @brief Confirmation from MAC to RRM for the bind/Unbind 
539  * request for the interface saps
540 *
541 * @details
542 *
543 *     Function : RgUiRgrBndCfm
544 *
545 *  @param[in]   Pst*  pst
546 *  @param[in]   SuId  suId
547 *  @param[in]   U8  status
548 *  @return   S16
549 *      -# ROK
550 **/
551 #ifdef ANSI
552 S16 RgUiRgrBndCfm
553 (
554 Pst* pst,
555 SuId suId,
556 U8 status
557 )
558 #else
559 S16 RgUiRgrBndCfm(pst, suId, status)
560 Pst* pst;
561 SuId suId;
562 U8 status;
563 #endif
564 {
565
566    return ((*RgUiRgrBndCfmMt[pst->selector])(pst, suId, status));
567
568 }
569 /**
570 * @brief Confirmation from MAC to RRM for the bind/Unbind 
571  * request for the interface saps via RGM interface
572 *
573 * @details
574 *
575 *     Function : RgUiRgmBndCfm
576 *
577 *  @param[in]   Pst*  pst
578 *  @param[in]   SuId  suId
579 *  @param[in]   U8  status
580 *  @return   S16
581 *      -# ROK
582 **/
583 #ifdef ANSI
584 S16 RgUiRgmBndCfm
585 (
586 Pst* pst,
587 SuId suId,
588 U8 status
589 )
590 #else
591 S16 RgUiRgmBndCfm(pst, suId, status)
592 Pst* pst;
593 SuId suId;
594 U8 status;
595 #endif
596 {
597
598    return ((*RgUiRgmBndCfmMt[pst->selector])(pst, suId, status));
599
600 }
601
602
603
604 /* Added for sending TTI tick to RRM */
605 \f
606 /**
607 * @brief TTI indication from MAC to RGR user.
608 *
609 * @details
610 *
611 *     Function : RgUiRgrTtiInd
612 *
613 *  @param[in]   Pst*  pst
614 *  @param[in]   SuId  suId
615 *  @param[in]   RgrTtiIndInfo  ttiInd
616 *  @return   S16
617 *      -# ROK
618 **/
619 #ifdef ANSI
620 S16 RgUiRgrTtiInd
621 (
622 Pst* pst,
623 SuId suId,
624 RgrTtiIndInfo  *ttiInd
625 )
626 #else
627 S16 RgUiRgrTtiInd(pst, suId, ttiInd)
628 Pst* pst;
629 SuId suId;
630 RgrTtiIndInfo *ttiInd;
631 #endif
632 {
633
634    return ((*RgUiRgrTtiIndMt[pst->selector])(pst, suId, ttiInd));
635
636 }
637
638
639 \f
640 /**
641 * @brief Configuration Confirm from MAC to RRM
642 *
643 * @details
644 *
645 *     Function : RgUiRgrCfgCfm
646 *
647 *  @param[in]   Pst*  pst
648 *  @param[in]   SuId  suId
649 *  @param[in]   RgrCfgTransId  transId
650 *  @param[in]   U8  status
651 *  @return   S16
652 *      -# ROK
653 **/
654 #ifdef ANSI
655 S16 RgUiRgrCfgCfm
656 (
657 Pst* pst,
658 RgrCfgTransId transId,
659 U8 status
660 )
661 #else
662 S16 RgUiRgrCfgCfm(pst, transId, status)
663 Pst* pst;
664 RgrCfgTransId transId;
665 U8 status;
666 #endif
667 {
668
669    return ((*RgUiRgrCfgCfmMt[pst->selector])(pst, transId, status));
670
671 }
672
673 \f
674 /**
675 * @brief Confirmation from MAC to RRC for the bind/Unbind 
676  * request for the interface saps
677 *
678 * @details
679 *
680 *     Function : RgUiCrgBndCfm
681 *
682 *  @param[in]   Pst*  pst
683 *  @param[in]   SuId  suId
684 *  @param[in]   U8  status
685 *  @return   S16
686 *      -# ROK
687 **/
688 #ifdef ANSI
689 S16 RgUiCrgBndCfm
690 (
691 Pst* pst,
692 SuId suId,
693 U8 status
694 )
695 #else
696 S16 RgUiCrgBndCfm(pst, suId, status)
697 Pst* pst;
698 SuId suId;
699 U8 status;
700 #endif
701 {
702
703    return ((*RgUiCrgBndCfmMt[pst->selector])(pst, suId, status));
704
705 }
706
707
708 \f
709 /**
710 * @brief Configuration Confirm from MAC to RRC
711 *
712 * @details
713 *
714 *     Function : RgUiCrgCfgCfm
715 *
716 *  @param[in]   Pst*  pst
717 *  @param[in]   SuId  suId
718 *  @param[in]   CrgCfgTransId  transId
719 *  @param[in]   U8  status
720 *  @return   S16
721 *      -# ROK
722 **/
723 #ifdef ANSI
724 S16 RgUiCrgCfgCfm
725 (
726 Pst* pst,
727 SuId suId,
728 CrgCfgTransId transId,
729 U8 status
730 )
731 #else
732 S16 RgUiCrgCfgCfm(pst, suId, transId, status)
733 Pst* pst;
734 SuId suId;
735 CrgCfgTransId transId;
736 U8 status;
737 #endif
738 {
739
740    return ((*RgUiCrgCfgCfmMt[pst->selector])(pst, suId, transId, status));
741
742 }
743
744 \f
745 /**
746 * @brief Confirmation from MAC to RLC for the bind/Unbind 
747  * request for the interface saps
748 *
749 * @details
750 *
751 *     Function : RgUiRguBndCfm
752 *
753 *  @param[in]   Pst*  pst
754 *  @param[in]   SuId  suId
755 *  @param[in]   U8  status
756 *  @return   S16
757 *      -# ROK
758 **/
759 #ifdef ANSI
760 S16 RgUiRguBndCfm
761 (
762 Pst* pst,
763 SuId suId,
764 U8 status
765 )
766 #else
767 S16 RgUiRguBndCfm(pst, suId, status)
768 Pst* pst;
769 SuId suId;
770 U8 status;
771 #endif
772 {
773
774    return ((*RgUiRguBndCfmMt[pst->selector])(pst, suId, status));
775
776 }
777
778 int macDDatIndSnt;
779 int macCDatIndSnt;
780
781 \f
782 /**
783 * @brief Data Indication from MAC to RLC to 
784  * forward the data received for common channels
785 *
786 * @details
787 *
788 *     Function : RgUiRguCDatInd
789 *
790 *  @param[in]   Pst*  pst
791 *  @param[in]   SuId  suId
792 *  @param[in]   RguCDatIndInfo  *  datInd
793 *  @return   S16
794 *      -# ROK
795 **/
796 #ifdef ANSI
797 S16 RgUiRguCDatInd
798 (
799 Pst* pst,
800 SuId suId,
801 RguCDatIndInfo  * datInd
802 )
803 #else
804 S16 RgUiRguCDatInd(pst, suId, datInd)
805 Pst* pst;
806 SuId suId;
807 RguCDatIndInfo  * datInd;
808 #endif
809 {
810    macCDatIndSnt++;
811
812    return ((*RgUiRguCDatIndMt[pst->selector])(pst, suId, datInd));
813
814 }
815
816 \f
817 /**
818 * @brief Data Indication from MAC to RLC to 
819  * forward the data received for dedicated channels
820 *
821 * @details
822 *
823 *     Function : RgUiRguDDatInd
824 *
825 *  @param[in]   Pst*  pst
826 *  @param[in]   SuId  suId
827 *  @param[in]   RguDDatIndInfo  *  datInd
828 *  @return   S16
829 *      -# ROK
830 **/
831 #ifdef ANSI
832 S16 RgUiRguDDatInd
833 (
834 Pst* pst,
835 SuId suId,
836 RguDDatIndInfo  * datInd
837 )
838 #else
839 S16 RgUiRguDDatInd(pst, suId, datInd)
840 Pst* pst;
841 SuId suId;
842 RguDDatIndInfo  * datInd;
843 #endif
844 {
845    macDDatIndSnt++;
846
847 #if defined(MAC_RLC_UL_RBUF) && !defined(SS_RBUF)
848    return (RgUiRguDDatIndRbuf(datInd));
849 #else 
850    return ((*RgUiRguDDatIndMt[pst->selector])(pst, suId, datInd));
851 #endif    
852 }
853
854
855 \f
856 /**
857 * @brief Status Indication from MAC to RLC  
858  * as a response to the staRsp primitive from RLC.
859  * Informs RLC of the totalBufferSize and Timing Info 
860  * for the transmission on common channels.
861 *
862 * @details
863 *
864 *     Function : RgUiRguCStaInd
865 *
866 *  @param[in]   Pst*  pst
867 *  @param[in]   SuId  suId
868 *  @param[in]   RguCStaIndInfo  *  staInd
869 *  @return   S16
870 *      -# ROK
871 **/
872 #ifdef ANSI
873 S16 RgUiRguCStaInd
874 (
875 Pst* pst,
876 SuId suId,
877 RguCStaIndInfo  * staInd
878 )
879 #else
880 S16 RgUiRguCStaInd(pst, suId, staInd)
881 Pst* pst;
882 SuId suId;
883 RguCStaIndInfo  * staInd;
884 #endif
885 {
886
887    return ((*RgUiRguCStaIndMt[pst->selector])(pst, suId, staInd));
888
889 }
890
891
892 \f
893 /**
894 * @brief Status Indication from MAC to RLC  
895  * as a response to the staRsp primitive from RLC.
896  * Informs RLC of the totalBufferSize and Timing Info 
897  * for the transmission on dedicated channels.
898 *
899 * @details
900 *
901 *     Function : RgUiRguDStaInd
902 *
903 *  @param[in]   Pst*  pst
904 *  @param[in]   SuId  suId
905 *  @param[in]   RguDStaIndInfo  *  staInd
906 *  @return   S16
907 *      -# ROK
908 **/
909 #ifdef ANSI
910 S16 RgUiRguDStaInd
911 (
912 Pst* pst,
913 SuId suId,
914 RguDStaIndInfo  * staInd
915 )
916 #else
917 S16 RgUiRguDStaInd(pst, suId, staInd)
918 Pst* pst;
919 SuId suId;
920 RguDStaIndInfo  * staInd;
921 #endif
922 {
923
924    return ((*RgUiRguDStaIndMt[pst->selector])(pst, suId, staInd));
925
926 }
927 #ifdef LTE_L2_MEAS
928 /* TODO: Function header */
929 #ifdef ANSI
930 S16 RgUiRguHqStaInd
931 (
932 Pst* pst,
933 SuId suId,
934 RguHarqStatusInd *harqStatusInd
935 )
936 #else
937 S16 RgUiRguHqStaInd(pst, suId, harqStatusInd)
938 Pst* pst;
939 SuId suId;
940 RguHarqStatusInd *harqStatusInd;
941 #endif
942 {
943
944 #if defined(SPLIT_RLC_DL_TASK) && defined(MAC_RLC_HARQ_STA_RBUF)
945    S16 ret=ROK;
946    ret = RgUiRguHqStaIndRbuf(pst,suId,harqStatusInd);
947    return (ret);
948 #else 
949    return ((*RgUiRguHqStaIndMt[pst->selector])(pst, suId, harqStatusInd));
950 #endif 
951
952 } /* RgUiRguHqStaInd */
953 #endif /* LTE_L2_MEAS */
954
955 #ifdef ANSI
956 S16 RgUiRguFlowCntrlInd
957 (
958 Pst* pst,
959 SuId suId,
960 RguFlowCntrlInd *flowCntrlInd
961 )
962 #else
963 S16 RgUiRguFlowCntrlInd(pst, suId, harqStatusInd)
964 Pst* pst;
965 SuId suId;
966 RguFlowCntrlInd *flowCntrlInd;
967 #endif
968 {
969   return ((*RgUiRguFlowCntrlIndMt[pst->selector])(pst, suId, flowCntrlInd));
970 }
971 /* Added for SI Enhancement*/
972 #ifdef RGR_SI_SCH
973 /**
974 * @brief SI Configuration Confirm from MAC to RRM
975 *
976 * @details
977 *
978 *     Function : RgUiRgrSiCfgCfm
979 *
980 *  @param[in]   Pst*  pst
981 *  @param[in]   SuId  suId
982 *  @param[in]   RgrCfgTransId  transId
983 *  @param[in]   U8  status
984 *  @return   S16
985 *      -# ROK
986 **/
987 #ifdef ANSI
988 S16 RgUiRgrSiCfgCfm
989 (
990 Pst* pst,
991 SuId suId,
992 RgrCfgTransId transId,
993 U8 status
994 )
995 #else
996 S16 RgUiRgrSiCfgCfm(pst, suId, transId, status)
997 Pst* pst;
998 SuId suId;
999 RgrCfgTransId transId;
1000 U8 status;
1001 #endif
1002 {
1003
1004    return ((*RgUiRgrSiCfgCfmMt[pst->selector])(pst, suId, transId, status));
1005
1006 }
1007
1008 /**
1009 * @brief Warning SI Configuration Confirm from MAC to RRM
1010 *
1011 * @details
1012 *
1013 *     Function : RgUiRgrWarningSiCfgCfm
1014 *
1015 *  @param[in]   Pst*  pst
1016 *  @param[in]   SuId  suId
1017 *  @param[in]   RgrCfgTransId  transId
1018 *  @param[in]   U8   siId
1019 *  @param[in]   U8  status
1020 *  @return   S16
1021 *      -# ROK
1022 **/
1023 #ifdef ANSI
1024 S16 RgUiRgrWarningSiCfgCfm
1025 (
1026 Pst* pst,
1027 SuId suId,
1028 RgrCfgTransId transId,
1029 U8   siId,
1030 U8 status
1031 )
1032 #else
1033 S16 RgUiRgrWarningSiCfgCfm(pst, suId, transId, siId,status)
1034 Pst* pst;
1035 SuId suId;
1036 RgrCfgTransId transId;
1037 U8  siId;
1038 U8 status;
1039 #endif
1040 {
1041    return ((*RgUiRgrWarningSiCfgCfmMt[pst->selector])
1042          (pst, suId, transId, siId, status));
1043 }
1044
1045 #endif/*RGR_SI_SCH*/
1046
1047 \f
1048 /* ccpu00117452 - MOD - Changed macro name from
1049    RGR_RRM_DLPWR_CNTRL to RGR_CQI_REPT */
1050 #ifdef RGR_CQI_REPT
1051 /**
1052 * @brief STA indication from MAC to RGR user.
1053 *
1054 * @details
1055 *
1056 *     Function : RgUiRgrStaInd
1057 *
1058 *  @param[in]   Pst*  pst
1059 *  @param[in]   SuId  suId
1060 *  @param[in]   RgrStaIndInfo  *staInd
1061 *  @return   S16
1062 *      -# ROK
1063 **/
1064 #ifdef ANSI
1065 S16 RgUiRgrStaInd
1066 (
1067 Pst* pst,
1068 SuId suId,
1069 RgrStaIndInfo  *staInd
1070 )
1071 #else
1072 S16 RgUiRgrStaInd(pst, suId, staInd)
1073 Pst* pst;
1074 SuId suId;
1075 RgrStaIndInfo *staInd;
1076 #endif
1077 {
1078
1079    return ((*RgUiRgrStaIndMt[pst->selector])(pst, suId, staInd));
1080
1081 }
1082 #endif /* End of RGR_CQI_REPT */
1083
1084 /* LTE_ADV_FLAG_REMOVED_START */
1085 /**
1086  * @brief LOAD INF indication from MAC to RGR user.
1087  *
1088  * @details
1089  *
1090  *     Function : RgUiRgrLoadInfInd
1091  *
1092  *  @param[in]   Pst*  pst
1093  *  @param[in]   SuId  suId
1094  *  @param[in]   RgrLoadInfIndInfo  *loadInfInd
1095  *  @return   S16
1096  *      -# ROK
1097  **/
1098 #ifdef ANSI
1099 S16 RgUiRgrLoadInfInd
1100 (
1101  Pst* pst,
1102  SuId suId,
1103  RgrLoadInfIndInfo  *loadInfInd
1104  )
1105 #else
1106 S16 RgUiRgrLoadInfInd(pst, suId, loadInfInd)
1107    Pst* pst;
1108    SuId suId;
1109    RgrLoadInfIndInfo *loadInfInd;
1110 #endif
1111 {
1112
1113    return ((*RgUiRgrLoadInfIndMt[pst->selector])(pst, suId, loadInfInd));
1114
1115 }
1116 /* LTE_ADV_FLAG_REMOVED_END */
1117
1118 /**
1119 * @brief UESTA indication from MAC to RGR user.
1120 *
1121 * @details
1122 *
1123 *     Function : RgUiRgrUeStaInd
1124 *
1125 *  @param[in]   Pst*  pst
1126 *  @param[in]   SuId  suId
1127 *  @param[in]   RgrStaIndInfo  *staInd
1128 *  @return   S16
1129 *      -# ROK
1130 **/
1131 #ifdef ANSI
1132 S16 RgUiRgrUeStaInd
1133 (
1134 Pst             *pst,
1135 SuId            suId,
1136 RgrUeStaIndInfo *ueStaInd
1137 )
1138 #else
1139 S16 RgUiRgrUeStaInd(pst, suId, ueStaInd)
1140 Pst             *pst;
1141 SuId            suId;
1142 RgrUeStaIndInfo *ueStaInd;
1143 #endif
1144 {
1145
1146    return ((*RgUiRgrUeStaIndMt[pst->selector])(pst, suId, ueStaInd));
1147
1148 }
1149 #endif /*--ifdef RG--*/
1150
1151 #ifdef PTRGUICRG
1152 \f
1153 /**
1154 * @brief Confirmation from MAC to RRC for the bind/Unbind 
1155  * request for the interface saps
1156 *
1157 * @details
1158 *
1159 *     Function : PtUiCrgBndCfm
1160 *
1161 *  @param[in]   Pst*  pst
1162 *  @param[in]   SuId  suId
1163 *  @param[in]   U8  status
1164 *  @return   S16
1165 *      -# ROK
1166 **/
1167 #ifdef ANSI
1168 S16 PtUiCrgBndCfm
1169 (
1170 Pst* pst,
1171 SuId suId,
1172 U8 status
1173 )
1174 #else
1175 S16 PtUiCrgBndCfm(pst, suId, status)
1176 Pst* pst;
1177 SuId suId;
1178 U8 status;
1179 #endif
1180 {
1181
1182    UNUSED(pst);
1183    UNUSED(suId);
1184    UNUSED(status);
1185
1186    return ROK;
1187
1188 }
1189
1190
1191 \f
1192 /**
1193 * @brief Configuration Confirm from MAC to RRC
1194 *
1195 * @details
1196 *
1197 *     Function : PtUiCrgCfgCfm
1198 *
1199 *  @param[in]   Pst*  pst
1200 *  @param[in]   SuId  suId
1201 *  @param[in]   CrgCfgTransId  transId
1202 *  @param[in]   U8  status
1203 *  @return   S16
1204 *      -# ROK
1205 **/
1206 #ifdef ANSI
1207 S16 PtUiCrgCfgCfm
1208 (
1209 Pst* pst,
1210 SuId suId,
1211 CrgCfgTransId transId,
1212 U8 status
1213 )
1214 #else
1215 S16 PtUiCrgCfgCfm(pst, suId, transId, status)
1216 Pst* pst;
1217 SuId suId;
1218 CrgCfgTransId transId;
1219 U8 status;
1220 #endif
1221 {
1222
1223    UNUSED(pst);
1224    UNUSED(suId);
1225    UNUSED(transId);
1226    UNUSED(status);
1227
1228    return ROK;
1229
1230 }
1231 #endif /*--ifdef PTRGUICRG--*/
1232
1233 #ifdef PTRGUIRGU
1234 \f
1235 /**
1236 * @brief Confirmation from MAC to RLC for the bind/Unbind 
1237  * request for the interface saps
1238 *
1239 * @details
1240 *
1241 *     Function : PtUiRguBndCfm
1242 *
1243 *  @param[in]   Pst*  pst
1244 *  @param[in]   SuId  suId
1245 *  @param[in]   U8  status
1246 *  @return   S16
1247 *      -# ROK
1248 **/
1249 #ifdef ANSI
1250 S16 PtUiRguBndCfm
1251 (
1252 Pst* pst,
1253 SuId suId,
1254 U8 status
1255 )
1256 #else
1257 S16 PtUiRguBndCfm(pst, suId, status)
1258 Pst* pst;
1259 SuId suId;
1260 U8 status;
1261 #endif
1262 {
1263
1264    UNUSED(pst);
1265    UNUSED(suId);
1266    UNUSED(status);
1267
1268    return ROK;
1269
1270 }
1271
1272
1273 \f
1274 /**
1275 * @brief Data Indication from MAC to RLC to 
1276  * forward the data received for common channels
1277 *
1278 * @details
1279 *
1280 *     Function : PtUiRguCDatInd
1281 *
1282 *  @param[in]   Pst*  pst
1283 *  @param[in]   SuId  suId
1284 *  @param[in]   RguCDatIndInfo  *  datInd
1285 *  @return   S16
1286 *      -# ROK
1287 **/
1288 #ifdef ANSI
1289 S16 PtUiRguCDatInd
1290 (
1291 Pst* pst,
1292 SuId suId,
1293 RguCDatIndInfo  * datInd
1294 )
1295 #else
1296 S16 PtUiRguCDatInd(pst, suId, datInd)
1297 Pst* pst;
1298 SuId suId;
1299 RguCDatIndInfo  * datInd;
1300 #endif
1301 {
1302
1303    UNUSED(pst);
1304    UNUSED(suId);
1305    UNUSED(datInd);
1306
1307    return ROK;
1308
1309 }
1310
1311
1312 \f
1313 /**
1314 * @brief Data Indication from MAC to RLC to 
1315  * forward the data received for dedicated channels
1316 *
1317 * @details
1318 *
1319 *     Function : PtUiRguDDatInd
1320 *
1321 *  @param[in]   Pst*  pst
1322 *  @param[in]   SuId  suId
1323 *  @param[in]   RguDDatIndInfo  *  datInd
1324 *  @return   S16
1325 *      -# ROK
1326 **/
1327 #ifdef ANSI
1328 S16 PtUiRguDDatInd
1329 (
1330 Pst* pst,
1331 SuId suId,
1332 RguDDatIndInfo  * datInd
1333 )
1334 #else
1335 S16 PtUiRguDDatInd(pst, suId, datInd)
1336 Pst* pst;
1337 SuId suId;
1338 RguDDatIndInfo  * datInd;
1339 #endif
1340 {
1341
1342    UNUSED(pst);
1343    UNUSED(suId);
1344    UNUSED(datInd);
1345
1346    return ROK;
1347
1348 }
1349
1350
1351 \f
1352 /**
1353 * @brief Status Indication from MAC to RLC  
1354  * as a response to the staRsp primitive from RLC.
1355  * Informs RLC of the totalBufferSize and Timing Info 
1356  * for the transmission on common channels.
1357 *
1358 * @details
1359 *
1360 *     Function : PtUiRguCStaInd
1361 *
1362 *  @param[in]   Pst*  pst
1363 *  @param[in]   SuId  suId
1364 *  @param[in]   RguCStaIndInfo  *  staInd
1365 *  @return   S16
1366 *      -# ROK
1367 **/
1368 #ifdef ANSI
1369 S16 PtUiRguCStaInd
1370 (
1371 Pst* pst,
1372 SuId suId,
1373 RguCStaIndInfo  * staInd
1374 )
1375 #else
1376 S16 PtUiRguCStaInd(pst, suId, staInd)
1377 Pst* pst;
1378 SuId suId;
1379 RguCStaIndInfo  * staInd;
1380 #endif
1381 {
1382
1383    UNUSED(pst);
1384    UNUSED(suId);
1385    UNUSED(staInd);
1386
1387    return ROK;
1388
1389 }
1390
1391
1392 \f
1393 /**
1394 * @brief Status Indication from MAC to RLC  
1395  * as a response to the staRsp primitive from RLC.
1396  * Informs RLC of the totalBufferSize and Timing Info 
1397  * for the transmission on dedicated channels.
1398 *
1399 * @details
1400 *
1401 *     Function : PtUiRguDStaInd
1402 *
1403 *  @param[in]   Pst*  pst
1404 *  @param[in]   SuId  suId
1405 *  @param[in]   RguDStaIndInfo  *  staInd
1406 *  @return   S16
1407 *      -# ROK
1408 **/
1409 #ifdef ANSI
1410 S16 PtUiRguDStaInd
1411 (
1412 Pst* pst,
1413 SuId suId,
1414 RguDStaIndInfo  * staInd
1415 )
1416 #else
1417 S16 PtUiRguDStaInd(pst, suId, staInd)
1418 Pst* pst;
1419 SuId suId;
1420 RguDStaIndInfo  * staInd;
1421 #endif
1422 {
1423
1424    UNUSED(pst);
1425    UNUSED(suId);
1426    UNUSED(staInd);
1427
1428    return ROK;
1429
1430 }
1431 #ifdef LTE_L2_MEAS
1432 /* TODO: Function Header */
1433 #ifdef ANSI
1434 S16 PtUiRguHqStaInd
1435 (
1436 Pst* pst,
1437 SuId suId,
1438 RguHarqStatusInd *harqStatusInd
1439 )
1440 #else
1441 S16 PtUiRguHqStaInd(pst, suId, harqStatusInd)
1442 Pst* pst;
1443 SuId suId;
1444 RguHarqStatusInd *harqStatusInd;
1445 #endif
1446 {
1447
1448    UNUSED(pst);
1449    UNUSED(suId);
1450    UNUSED(harqStatusInd);
1451
1452    return ROK;
1453
1454 }
1455 #endif /* LTE_L2_MEAS */
1456
1457 #ifdef ANSI
1458 S16 PtUiRguFlowCntrlInd
1459 (
1460 Pst* pst,
1461 SuId suId,
1462 RguFlowCntrlInd *flowCntrlInd
1463 )
1464 #else
1465 S16 PtUiRguFlowCntrlInd(pst, suId, flowCntrlInd)
1466 Pst* pst;
1467 SuId suId;
1468 RguHarqStatusInd *flowCntrlInd;
1469 #endif
1470 {
1471
1472    UNUSED(pst);
1473    UNUSED(suId);
1474    UNUSED(flowCntrlInd);
1475
1476    return ROK;
1477
1478 }
1479 \f
1480 #endif /*--ifdef PTRGUIRGU--*/
1481
1482 #ifdef PTRGUIRGR
1483 \f
1484 /**
1485 * @brief Confirmation from MAC to RRM for the bind/Unbind 
1486  * request for the interface saps
1487 *
1488 * @details
1489 *
1490 *     Function : PtUiRgrBndCfm
1491 *
1492 *  @param[in]   Pst*  pst
1493 *  @param[in]   SuId  suId
1494 *  @param[in]   U8  status
1495 *  @return   S16
1496 *      -# ROK
1497 **/
1498 #ifdef ANSI
1499 S16 PtUiRgrBndCfm
1500 (
1501 Pst* pst,
1502 SuId suId,
1503 U8 status
1504 )
1505 #else
1506 S16 PtUiRgrBndCfm(pst, suId, status)
1507 Pst* pst;
1508 SuId suId;
1509 U8 status;
1510 #endif
1511 {
1512
1513    UNUSED(pst);
1514    UNUSED(suId);
1515    UNUSED(status);
1516
1517    return ROK;
1518
1519 }
1520
1521 /* Added for sending TTI tick to RRM */
1522 \f
1523 /**
1524 * @brief TTI indication from MAC to RGR user.
1525 *
1526 * @details
1527 *
1528 *     Function : PtUiRgrTtiInd
1529 *
1530 *  @param[in]   Pst*  pst
1531 *  @param[in]   SuId  suId
1532 *  @param[in]   RgrTtiIndInfo  *ttiInd
1533 *  @return   S16
1534 *      -# ROK
1535 **/
1536 #ifdef ANSI
1537 S16 PtUiRgrTtiInd
1538 (
1539 Pst* pst,
1540 SuId suId,
1541 RgrTtiIndInfo *ttiInd
1542 )
1543 #else
1544 S16 PtUiRgrTtiInd(pst, suId, ttiInd)
1545 Pst* pst;
1546 SuId suId;
1547 RgrTtiIndInfo *ttiInd;
1548 #endif
1549 {
1550
1551    UNUSED(pst);
1552    UNUSED(suId);
1553    UNUSED(ttiInd);
1554
1555    return ROK;
1556
1557 }
1558
1559
1560 \f
1561 /**
1562 * @brief Configuration Confirm from MAC to RRM
1563 *
1564 * @details
1565 *
1566 *     Function : PtUiRgrCfgCfm
1567 *
1568 *  @param[in]   Pst*  pst
1569 *  @param[in]   SuId  suId
1570 *  @param[in]   RgrCfgTransId  transId
1571 *  @param[in]   U8  status
1572 *  @return   S16
1573 *      -# ROK
1574 **/
1575 #ifdef ANSI
1576 S16 PtUiRgrCfgCfm
1577 (
1578 Pst* pst,
1579 SuId suId,
1580 RgrCfgTransId transId,
1581 U8 status
1582 )
1583 #else
1584 S16 PtUiRgrCfgCfm(pst, suId, transId, status)
1585 Pst* pst;
1586 SuId suId;
1587 RgrCfgTransId transId;
1588 U8 status;
1589 #endif
1590 {
1591
1592    UNUSED(pst);
1593    UNUSED(suId);
1594    UNUSED(transId);
1595    UNUSED(status);
1596
1597    return ROK;
1598
1599 }
1600
1601 /* Added for SI Enhancement*/
1602 #ifdef RGR_SI_SCH
1603 /**
1604 * @brief SI Configuration Confirm from MAC to RRM
1605 *
1606 * @details
1607 *
1608 *     Function : PtUiRgrSiCfgCfm
1609 *
1610 *  @param[in]   Pst*  pst
1611 *  @param[in]   SuId  suId
1612 *  @param[in]   RgrCfgTransId  transId
1613 *  @param[in]   U8  status
1614 *  @return   S16
1615 *      -# ROK
1616 **/
1617 #ifdef ANSI
1618 S16 PtUiRgrSiCfgCfm
1619 (
1620 Pst* pst,
1621 SuId suId,
1622 RgrCfgTransId transId,
1623 U8 status
1624 )
1625 #else
1626 S16 PtUiRgrSiCfgCfm(pst, suId, transId, status)
1627 Pst* pst;
1628 SuId suId;
1629 RgrCfgTransId transId;
1630 U8 status;
1631 #endif
1632 {
1633
1634    UNUSED(pst);
1635    UNUSED(suId);
1636    UNUSED(transId);
1637    UNUSED(status);
1638
1639    return ROK;
1640
1641 }
1642
1643 /**
1644 * @brief Warning SI Configuration Confirm from MAC to RRM
1645 *
1646 * @details
1647 *
1648 *     Function : PtUiRgrWarningSiCfgCfm
1649 *
1650 *  @param[in]   Pst*  pst
1651 *  @param[in]   SuId  suId
1652 *  @param[in]   RgrCfgTransId  transId
1653 *  @param[in]   U8 siId
1654 *  @param[in]   U8  status
1655 *  @return   S16
1656 *      -# ROK
1657 **/
1658 #ifdef ANSI
1659 S16 PtUiRgrWarningSiCfgCfm
1660 (
1661 Pst* pst,
1662 SuId suId,
1663 RgrCfgTransId transId,
1664 U8 siId,
1665 U8 status
1666 )
1667 #else
1668 S16 PtUiRgrWarningSiCfgCfm(pst, suId, transId, siId, status)
1669 Pst* pst;
1670 SuId suId;
1671 RgrCfgTransId transId;
1672 U8  siId;
1673 U8 status;
1674 #endif
1675 {
1676    UNUSED(pst);
1677    UNUSED(suId);
1678    UNUSED(transId);
1679    UNUSED(siId);
1680    UNUSED(status);
1681
1682    return ROK;
1683 }
1684 #endif/* RGR_SI_SCH */
1685
1686 \f
1687 /* ccpu00117452 - MOD - Changed macro name from
1688    RGR_RRM_DLPWR_CNTRL to RGR_CQI_REPT */
1689 #ifdef RGR_CQI_REPT
1690 /**
1691 * @brief STA indication from MAC to RGR user.
1692 *
1693 * @details
1694 *
1695 *     Function : PtUiRgrStaInd
1696 *
1697 *  @param[in]   Pst*  pst
1698 *  @param[in]   SuId  suId
1699 *  @param[in]   RgrStaIndInfo  *staInd
1700 *  @return   S16
1701 *      -# ROK
1702 **/
1703 #ifdef ANSI
1704 S16 PtUiRgrStaInd
1705 (
1706 Pst* pst,
1707 SuId suId,
1708 RgrStaIndInfo  *staInd
1709 )
1710 #else
1711 S16 PtUiRgrStaInd(pst, suId, staInd)
1712 Pst* pst;
1713 SuId suId;
1714 RgrStaIndInfo *staInd;
1715 #endif
1716 {
1717
1718    UNUSED(pst);
1719    UNUSED(suId);
1720    UNUSED(staInd);
1721
1722    return ROK;
1723
1724 }
1725 #endif /* End of RGR_CQI_REPT */
1726 /* LTE_ADV_FLAG_REMOVED_START */
1727 /**
1728  * @brief LOAD INF indication from MAC to RGR user.
1729  *
1730  * @details
1731  *
1732  *     Function : PtUiRgrLoadInfInd
1733  *
1734  *  @param[in]   Pst*  pst
1735  *  @param[in]   SuId  suId
1736  *  @param[in]   RgrLoadInfIndInfo  *loadInfInd
1737  *  @return   S16
1738  *      -# ROK
1739  **/
1740 #ifdef ANSI
1741 S16 PtUiRgrLoadInfInd
1742 (
1743  Pst* pst,
1744  SuId suId,
1745  RgrLoadInfIndInfo  *loadInfInd
1746  )
1747 #else
1748 S16 PtUiRgrLoadInfInd(pst, suId, loadInfInd)
1749    Pst* pst;
1750    SuId suId;
1751    RgrLoadInfIndInfo *loadInfInd;
1752 #endif
1753 {
1754
1755    UNUSED(pst);
1756    UNUSED(suId);
1757    UNUSED(loadInfInd);
1758
1759    return ROK;
1760
1761 }
1762 /* LTE_ADV_FLAG_REMOVED_END */
1763
1764 /**
1765 * @brief STA indication from MAC to RGR user.
1766 *
1767 * @details
1768 *
1769 *     Function : PtUiRgrUeStaInd
1770 *
1771 *  @param[in]   Pst*  pst
1772 *  @param[in]   SuId  suId
1773 *  @param[in]   RgrUeStaIndInfo  *ueStaInd
1774 *  @return   S16
1775 *      -# ROK
1776 **/
1777 #ifdef ANSI
1778 S16 PtUiRgrUeStaInd
1779 (
1780 Pst* pst,
1781 SuId suId,
1782 RgrUeStaIndInfo  *ueStaInd
1783 )
1784 #else
1785 S16 PtUiRgrUeStaInd(pst, suId, ueStaInd)
1786 Pst* pst;
1787 SuId suId;
1788 RgrUeStaIndInfo *ueStaInd;
1789 #endif
1790 {
1791
1792    UNUSED(pst);
1793    UNUSED(suId);
1794    UNUSED(ueStaInd);
1795
1796    return ROK;
1797
1798 }
1799 #endif /*--ifdef PTRGUIRGR--*/
1800
1801
1802 #ifdef PTRGUIRGM
1803 /**
1804 * @brief Confirmation from MAC to RRM for the bind/Unbind 
1805  * request for the interface saps via RGM interface
1806 *
1807 * @details
1808 *
1809 *     Function : PtUiRgmBndCfm
1810 *
1811 *  @param[in]   Pst*  pst
1812 *  @param[in]   SuId  suId
1813 *  @param[in]   U8  status
1814 *  @return   S16
1815 *      -# ROK
1816 **/
1817 #ifdef ANSI
1818 S16 PtUiRgmBndCfm
1819 (
1820 Pst* pst,
1821 SuId suId,
1822 U8 status
1823 )
1824 #else
1825 S16 PtUiRgmBndCfm(pst, suId, status)
1826 Pst* pst;
1827 SuId suId;
1828 U8 status;
1829 #endif
1830 {
1831
1832    UNUSED(pst);
1833    UNUSED(suId);
1834    UNUSED(status);
1835
1836    return ROK;
1837
1838 }
1839
1840 /**
1841 * @brief Average PRB indication from MAC to RRM
1842 *
1843 * @details
1844 *
1845 *     Function : PtUiRgmPrbRprtInd
1846 *
1847 *  @param[in]   Pst*  pst
1848 *  @param[in]   SuId  suId
1849 *  @param[in]   RgrUeStaIndInfo  *ueStaInd
1850 *  @return   S16
1851 *      -# ROK
1852 **/
1853 #ifdef ANSI
1854 S16 PtUiRgmPrbRprtInd
1855 (
1856 Pst* pst,
1857 SuId suId,
1858 RgmPrbRprtInd *prbRprtInd
1859 )
1860 #else
1861 S16 PtUiRgmPrbRprtInd(pst, suId, prbRprtInd)
1862 Pst* pst;
1863 SuId suId;
1864 RgmPrbRprtInd *prbRprtInd;
1865 #endif
1866 {
1867
1868    UNUSED(pst);
1869    UNUSED(suId);
1870    UNUSED(prbRprtInd);
1871
1872    return ROK;
1873
1874 }
1875
1876 /**
1877 * @brief Transmission Mode Change indication from MAC to RRM
1878 *
1879 * @details
1880 *
1881 *     Function : PtUiRgmTransModeInd
1882 *
1883 *  @param[in]   Pst*  pst
1884 *  @param[in]   SuId  suId
1885 *  @param[in]   RgmTransModeInd *transModeInd
1886 *  @return   S16
1887 *      -# ROK
1888 **/
1889 #ifdef ANSI
1890 S16 PtUiRgmTransModeInd
1891 (
1892 Pst* pst,
1893 SuId suId,
1894 RgmTransModeInd *transModeInd
1895 )
1896 #else
1897 S16 PtUiRgmTransModeInd(pst, suId, transModeInd)
1898 Pst* pst;
1899 SuId suId;
1900 RgmTransModeInd *transModeInd;
1901 #endif
1902 {
1903
1904    UNUSED(pst);
1905    UNUSED(suId);
1906    UNUSED(transModeInd);
1907
1908    return ROK;
1909
1910 }
1911 #endif
1912
1913 /**
1914 * @brief Average PRB indication from MAC to RRM
1915 *
1916 * @details
1917 *
1918 *     Function : RgUiRgmSendPrbRprtInd
1919 *
1920 *  @param[in]   Pst*  pst
1921 *  @param[in]   SuId  suId
1922 *  @param[in]   RgmPrbRprtInd prbRprtInd
1923 *  @return   S16
1924 *      -# ROK
1925 **/
1926 #ifdef ANSI
1927 S16 RgUiRgmSendPrbRprtInd
1928 (
1929 Pst* pst,
1930 SuId suId,
1931 RgmPrbRprtInd *prbRprtInd
1932 )
1933 #else
1934 S16 RgUiRgmSendPrbRprtInd(pst, suId, prbRprtInd)
1935 Pst* pst;
1936 SuId suId;
1937 RgmPrbRprtInd *prbRprtInd;
1938 #endif
1939
1940 {
1941    return ((*RgUiRgmSendPrbRprtIndMt[pst->selector])(pst, suId, prbRprtInd));
1942 }
1943
1944 /**
1945 * @brief Transmission Mode change indication from MAC to RRM
1946 *
1947 * @details
1948 *
1949 *     Function : RgUiRgmChangeTransModeInd
1950 *
1951 *  @param[in]   Pst*  pst
1952 *  @param[in]   SuId  suId
1953 *  @param[in]   RgmTransModeInd transModeInd
1954 *  @return   S16
1955 *      -# ROK
1956 **/
1957 #ifdef ANSI
1958 S16 RgUiRgmChangeTransModeInd
1959 (
1960 Pst* pst,
1961 SuId suId,
1962 RgmTransModeInd *transModeInd
1963 )
1964 #else
1965 S16 RgUiRgmChangeTransModeInd(pst, suId, transModeInd)
1966 Pst* pst;
1967 SuId suId;
1968 RgmTransModeInd *transModeInd;
1969 #endif
1970
1971 {
1972    return ((*RgUiRgmChangeTransModeIndMt[pst->selector])(pst, suId, transModeInd));
1973 }
1974
1975 #if defined(MAC_RLC_UL_RBUF) && !defined(SS_RBUF)
1976 PRIVATE S16 RgUiRguDDatIndRbuf(RguDDatIndInfo  *datInd)
1977 {
1978       S16  ret = ROK;
1979       Void *elem = NULLP;
1980       RguDedDatInd1 *rguDatIndl = NULLP;
1981       elem = SRngGetWIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
1982       rguDatIndl = (RguDedDatInd1 *) elem;
1983       if (NULLP == elem)
1984       {
1985          SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].pktDrop++;
1986          U32 i,j;
1987          for(i = 0; i< datInd->numLch; i++)
1988          {
1989             for(j = 0; j < datInd->lchData[i].pdu.numPdu; j++)
1990             {
1991                if(datInd->lchData[i].pdu.mBuf[j])
1992                {
1993                   SPutMsg(datInd->lchData[i].pdu.mBuf[j]);
1994                }
1995             }
1996          }
1997          rgFreeSharableSBuf((Data **)&datInd,sizeof(RguDDatIndInfo));
1998          ret = RFAILED;
1999       }
2000       else
2001       {
2002          rguDatIndl->msg = datInd;
2003          SRngIncrWIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
2004          SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].pktRate++;
2005       }
2006   return (ret);
2007 }
2008 #endif
2009 #ifdef RLC_MAC_DAT_REQ_RBUF
2010 #ifdef ANSI
2011 S16 rgDlDatReqBatchProc
2012 (
2013 Void
2014 )
2015 #else
2016 S16 rgDlDatReqBatchProc()
2017 Void;
2018 #endif
2019 {
2020 /* Read from Ring Buffer and process PDCP packets */
2021
2022    U8 rngBufDeqIndx = 0;
2023    PRIVATE Pst rgDDatRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUDDATREQ,0,0,2,0};
2024    PRIVATE Pst rgCDatRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUCDATREQ,0,0,2,0};
2025    Void *elmIndx = NULLP;
2026    RguInfoRingElem *datReqRing=NULLP;
2027    elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
2028    while(NULLP != elmIndx)
2029    {
2030       datReqRing= (RguInfoRingElem *)elmIndx;
2031       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].nPktProc++;;//Number of pkt processed in tti
2032       if(datReqRing->msg)
2033       {
2034          if(datReqRing->event == EVTRGUDDATREQ)
2035          {
2036          RgUiRguDDatReq(&rgDDatRbfuPst, datReqRing->spId, (RguDDatReqInfo *) datReqRing->msg);
2037          }
2038          else
2039          { 
2040           //  printf("CSHP:*** Received CDatReq in MAC Ring  \n");
2041          RgUiRguCDatReq(&rgCDatRbfuPst, datReqRing->spId, (RguCDatReqInfo *) datReqRing->msg); 
2042          }
2043       }
2044       else
2045       {
2046               printf(" Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->read,
2047               SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->write);
2048               /* Due to the cache issue we are verifying the mbuf pointer again and sending it to rlc if avilable*/
2049               if(datReqRing->msg)
2050               {
2051                       if(datReqRing->event == EVTRGUDDATREQ)
2052                               RgUiRguDDatReq(&rgDDatRbfuPst, datReqRing->spId, (RguDDatReqInfo *) datReqRing->msg);
2053                       else 
2054                               RgUiRguCDatReq(&rgCDatRbfuPst, datReqRing->spId, (RguCDatReqInfo *) datReqRing->msg); 
2055               }else 
2056               {
2057                       printf(" still Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->read,
2058                       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->write);
2059               } 
2060       }
2061       datReqRing->msg=NULLP;
2062       SRngIncrRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
2063       datReqRing->event=0; 
2064       elmIndx = NULLP;
2065       datReqRing= NULLP;
2066       rngBufDeqIndx++;
2067
2068       if(rngBufDeqIndx >= SS_RNG_MAX_DLRLC_TO_DLMAC_DAT_REQ_DQ_CNT)
2069         break;
2070
2071       if((elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ)) == NULLP)
2072       break;
2073    }
2074  
2075    return ROK;
2076 }
2077 #endif 
2078
2079 #ifdef RLC_MAC_STA_RSP_RBUF
2080 #ifdef ANSI
2081 S16 rgDlStaRspBatchProc
2082 (
2083 Void
2084 )
2085 #else
2086 S16 rgDlStaRspBatchProc()
2087 Void;
2088 #endif
2089 {
2090 /* Read from Ring Buffer and process PDCP packets */
2091
2092    U8 rngBufDeqIndx = 0;
2093    PRIVATE Pst rgDStaRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUDSTARSP,0,0,2,0};
2094    PRIVATE Pst rgCStaRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUCSTARSP,0,0,2,0};
2095    Void *elmIndx = NULLP;
2096    RguInfoRingElem *staRspRing=NULLP;
2097
2098    elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
2099    while(NULLP != elmIndx)
2100    {
2101       staRspRing= (RguInfoRingElem *)elmIndx;
2102       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].nPktProc++;;//Number of pkt processed in tti
2103       
2104       if(staRspRing->msg!= NULLP)
2105       {
2106          if( staRspRing->event == EVTRGUDSTARSP)
2107          {
2108          RgUiRguDStaRsp(&rgDStaRbfuPst, staRspRing->spId, (RguDStaRspInfo *) staRspRing->msg);
2109          }
2110          else
2111          {
2112          RgUiRguCStaRsp(&rgCStaRbfuPst, staRspRing->spId, (RguCStaRspInfo *) staRspRing->msg);
2113          } 
2114       }
2115       else
2116       {
2117               printf(" Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->read,
2118                               SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->write);
2119               /* Due to the cache issue we are verifying the mbuf pointer again and sending it to rlc if avilable*/
2120               if(staRspRing->msg!= NULLP)
2121               {
2122                       if( staRspRing->event == EVTRGUDSTARSP)
2123                               RgUiRguDStaRsp(&rgDStaRbfuPst, staRspRing->spId, (RguDStaRspInfo *) staRspRing->msg);
2124                       else  
2125                               RgUiRguCStaRsp(&rgCStaRbfuPst, staRspRing->spId, (RguCStaRspInfo *) staRspRing->msg);
2126               }else 
2127               {
2128                       printf(" still Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->read,
2129                                       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->write);
2130               } 
2131       }
2132       staRspRing->msg=NULLP;
2133       SRngIncrRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
2134       staRspRing->event =0;    
2135       elmIndx = NULLP;
2136       staRspRing= NULLP;
2137
2138       rngBufDeqIndx++;
2139
2140       if(rngBufDeqIndx >= SS_RNG_MAX_DLRLC_TO_DLMAC_STA_RSP_DQ_CNT)
2141         break;
2142
2143       if((elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC)) == NULLP)
2144       break;
2145    }
2146  
2147    return ROK;
2148 }
2149 #endif 
2150 #ifdef LTE_L2_MEAS
2151 #ifdef MAC_RLC_HARQ_STA_RBUF
2152 #ifdef ANSI
2153 S16 RgUiRguHqStaIndRbuf 
2154 (
2155 Pst* pst,
2156 SuId suId,
2157 RguHarqStatusInd *harqStatusInd
2158 )
2159 #else
2160 S16 RgUiRguHqStaIndRbuf(pst, suId, harqStatusInd)
2161 Pst* pst;
2162 SuId suId;
2163 RguHarqStatusInd *harqStatusInd;
2164 #endif
2165 {
2166    S16  ret = ROK;
2167    Void *elem = NULLP;
2168    RguHarqStaInd *harqStaInd = NULLP;
2169    elem = SRngGetWIndx(SS_RNG_BUF_MAC_HARQ);
2170    harqStaInd = (RguHarqStaInd*) elem;
2171    if (NULLP == elem )
2172    {
2173       SsRngInfoTbl[SS_RNG_BUF_MAC_HARQ].pktDrop++;
2174       ret = RFAILED;
2175    }
2176    else
2177    {
2178       memcpy(&(harqStaInd->hqStatusInd), harqStatusInd, sizeof(RguHarqStatusInd));
2179       memcpy(&(harqStaInd->pst), pst, sizeof(Pst));
2180       SRngIncrWIndx(SS_RNG_BUF_MAC_HARQ);
2181       SsRngInfoTbl[SS_RNG_BUF_MAC_HARQ].pktRate++;
2182    }
2183    return (ret);
2184 }
2185 #endif
2186 #endif
2187
2188 \f
2189 /**********************************************************************
2190  
2191          End of file
2192 **********************************************************************/