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