RLC-MAC Interface APIs and Memory configuration Changes
[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, /* Call packRcvdUlData instead */
341 #else
342    PtUiRguCDatInd,
343 #endif
344 #ifdef KW
345    KwLiRguCDatInd,
346 #else
347    PtUiRguCDatInd,
348 #endif
349 #ifdef LWLCRGUIRGU
350 //   cmPkRguCDatInd, /* Call packRcvdUlData instead */
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,  /* Call packRcvdUlData instead */
362 #else
363    PtUiRguDDatInd,
364 #endif
365 #ifdef KW
366    KwLiRguDDatInd,
367 #else
368    PtUiRguDDatInd,
369 #endif
370 #ifdef LWLCRGUIRGU
371 //   cmPkRguDDatInd, /* Call packRcvdUlData instead */
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, /* Call packSchedRep instead of cmPkRguCStaInd */
385 #else
386    PtUiRguCStaInd,
387 #endif
388 #ifdef KW
389    //RlcMacProcSchedRep,
390 #else
391    PtUiRguCStaInd,
392 #endif
393 #ifdef LWLCRGUIRGU
394    //cmPkRguCStaInd, /* Call packSchedRep instead of 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, /* Call packSchedRep instead of cmPkRguDStaInd */
408 #else
409    PtUiRguDStaInd,
410 #endif
411 #ifdef KW
412    //RlcMacProcSchedRep,
413 #else
414    PtUiRguDStaInd,
415 #endif
416 #ifdef LWLCRGUIRGU
417    //cmPkRguDStaInd, /* Call packSchedRep instead of 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 RgrCfgTransId transId,
682 U8 status
683 )
684 #else
685 PUBLIC S16 RgUiRgrCfgCfm(pst, transId, status)
686 Pst* pst;
687 RgrCfgTransId transId;
688 U8 status;
689 #endif
690 {
691
692    TRC3(RgUiRgrCfgCfm);
693
694    RETVALUE((*RgUiRgrCfgCfmMt[pst->selector])(pst, transId, status));
695
696 }
697
698 \f
699 /**
700 * @brief Confirmation from MAC to RRC for the bind/Unbind 
701  * request for the interface saps
702 *
703 * @details
704 *
705 *     Function : RgUiCrgBndCfm
706 *
707 *  @param[in]   Pst*  pst
708 *  @param[in]   SuId  suId
709 *  @param[in]   U8  status
710 *  @return   S16
711 *      -# ROK
712 **/
713 #ifdef ANSI
714 PUBLIC S16 RgUiCrgBndCfm
715 (
716 Pst* pst,
717 SuId suId,
718 U8 status
719 )
720 #else
721 PUBLIC S16 RgUiCrgBndCfm(pst, suId, status)
722 Pst* pst;
723 SuId suId;
724 U8 status;
725 #endif
726 {
727
728    TRC3(RgUiCrgBndCfm);
729
730    RETVALUE((*RgUiCrgBndCfmMt[pst->selector])(pst, suId, status));
731
732 }
733
734
735 \f
736 /**
737 * @brief Configuration Confirm from MAC to RRC
738 *
739 * @details
740 *
741 *     Function : RgUiCrgCfgCfm
742 *
743 *  @param[in]   Pst*  pst
744 *  @param[in]   SuId  suId
745 *  @param[in]   CrgCfgTransId  transId
746 *  @param[in]   U8  status
747 *  @return   S16
748 *      -# ROK
749 **/
750 #ifdef ANSI
751 PUBLIC S16 RgUiCrgCfgCfm
752 (
753 Pst* pst,
754 SuId suId,
755 CrgCfgTransId transId,
756 U8 status
757 )
758 #else
759 PUBLIC S16 RgUiCrgCfgCfm(pst, suId, transId, status)
760 Pst* pst;
761 SuId suId;
762 CrgCfgTransId transId;
763 U8 status;
764 #endif
765 {
766
767    TRC3(RgUiCrgCfgCfm);
768
769    RETVALUE((*RgUiCrgCfgCfmMt[pst->selector])(pst, suId, transId, status));
770
771 }
772
773 \f
774 /**
775 * @brief Confirmation from MAC to RLC for the bind/Unbind 
776  * request for the interface saps
777 *
778 * @details
779 *
780 *     Function : RgUiRguBndCfm
781 *
782 *  @param[in]   Pst*  pst
783 *  @param[in]   SuId  suId
784 *  @param[in]   U8  status
785 *  @return   S16
786 *      -# ROK
787 **/
788 #ifdef ANSI
789 PUBLIC S16 RgUiRguBndCfm
790 (
791 Pst* pst,
792 SuId suId,
793 U8 status
794 )
795 #else
796 PUBLIC S16 RgUiRguBndCfm(pst, suId, status)
797 Pst* pst;
798 SuId suId;
799 U8 status;
800 #endif
801 {
802
803    TRC3(RgUiRguBndCfm);
804
805    RETVALUE((*RgUiRguBndCfmMt[pst->selector])(pst, suId, status));
806
807 }
808
809 PUBLIC int macDDatIndSnt;
810 PUBLIC int macCDatIndSnt;
811
812 \f
813 /**
814 * @brief Data Indication from MAC to RLC to 
815  * forward the data received for common channels
816 *
817 * @details
818 *
819 *     Function : RgUiRguCDatInd
820 *
821 *  @param[in]   Pst*  pst
822 *  @param[in]   SuId  suId
823 *  @param[in]   RguCDatIndInfo  *  datInd
824 *  @return   S16
825 *      -# ROK
826 **/
827 #ifdef ANSI
828 PUBLIC S16 RgUiRguCDatInd
829 (
830 Pst* pst,
831 SuId suId,
832 RguCDatIndInfo  * datInd
833 )
834 #else
835 PUBLIC S16 RgUiRguCDatInd(pst, suId, datInd)
836 Pst* pst;
837 SuId suId;
838 RguCDatIndInfo  * datInd;
839 #endif
840 {
841    macCDatIndSnt++;
842
843    TRC3(RgUiRguCDatInd);
844
845    RETVALUE((*RgUiRguCDatIndMt[pst->selector])(pst, suId, datInd));
846
847 }
848
849 \f
850 /**
851 * @brief Data Indication from MAC to RLC to 
852  * forward the data received for dedicated channels
853 *
854 * @details
855 *
856 *     Function : RgUiRguDDatInd
857 *
858 *  @param[in]   Pst*  pst
859 *  @param[in]   SuId  suId
860 *  @param[in]   RguDDatIndInfo  *  datInd
861 *  @return   S16
862 *      -# ROK
863 **/
864 #ifdef ANSI
865 PUBLIC S16 RgUiRguDDatInd
866 (
867 Pst* pst,
868 SuId suId,
869 RguDDatIndInfo  * datInd
870 )
871 #else
872 PUBLIC S16 RgUiRguDDatInd(pst, suId, datInd)
873 Pst* pst;
874 SuId suId;
875 RguDDatIndInfo  * datInd;
876 #endif
877 {
878    macDDatIndSnt++;
879
880    TRC3(RgUiRguDDatInd);
881
882 #if defined(MAC_RLC_UL_RBUF) && !defined(SS_RBUF)
883    RETVALUE(RgUiRguDDatIndRbuf(datInd));
884 #else 
885    RETVALUE((*RgUiRguDDatIndMt[pst->selector])(pst, suId, datInd));
886 #endif    
887 }
888
889
890 \f
891 /**
892 * @brief Status Indication from MAC to RLC  
893  * as a response to the staRsp primitive from RLC.
894  * Informs RLC of the totalBufferSize and Timing Info 
895  * for the transmission on common channels.
896 *
897 * @details
898 *
899 *     Function : RgUiRguCStaInd
900 *
901 *  @param[in]   Pst*  pst
902 *  @param[in]   SuId  suId
903 *  @param[in]   RguCStaIndInfo  *  staInd
904 *  @return   S16
905 *      -# ROK
906 **/
907 #ifdef ANSI
908 PUBLIC S16 RgUiRguCStaInd
909 (
910 Pst* pst,
911 SuId suId,
912 RguCStaIndInfo  * staInd
913 )
914 #else
915 PUBLIC S16 RgUiRguCStaInd(pst, suId, staInd)
916 Pst* pst;
917 SuId suId;
918 RguCStaIndInfo  * staInd;
919 #endif
920 {
921
922    TRC3(RgUiRguCStaInd);
923
924    RETVALUE((*RgUiRguCStaIndMt[pst->selector])(pst, suId, staInd));
925
926 }
927
928
929 \f
930 /**
931 * @brief Status Indication from MAC to RLC  
932  * as a response to the staRsp primitive from RLC.
933  * Informs RLC of the totalBufferSize and Timing Info 
934  * for the transmission on dedicated channels.
935 *
936 * @details
937 *
938 *     Function : RgUiRguDStaInd
939 *
940 *  @param[in]   Pst*  pst
941 *  @param[in]   SuId  suId
942 *  @param[in]   RguDStaIndInfo  *  staInd
943 *  @return   S16
944 *      -# ROK
945 **/
946 #ifdef ANSI
947 PUBLIC S16 RgUiRguDStaInd
948 (
949 Pst* pst,
950 SuId suId,
951 RguDStaIndInfo  * staInd
952 )
953 #else
954 PUBLIC S16 RgUiRguDStaInd(pst, suId, staInd)
955 Pst* pst;
956 SuId suId;
957 RguDStaIndInfo  * staInd;
958 #endif
959 {
960
961    TRC3(RgUiRguDStaInd);
962
963    RETVALUE((*RgUiRguDStaIndMt[pst->selector])(pst, suId, staInd));
964
965 }
966 #ifdef LTE_L2_MEAS
967 /* TODO: Function header */
968 #ifdef ANSI
969 PUBLIC S16 RgUiRguHqStaInd
970 (
971 Pst* pst,
972 SuId suId,
973 RguHarqStatusInd *harqStatusInd
974 )
975 #else
976 PUBLIC S16 RgUiRguHqStaInd(pst, suId, harqStatusInd)
977 Pst* pst;
978 SuId suId;
979 RguHarqStatusInd *harqStatusInd;
980 #endif
981 {
982
983    TRC3(RgUiRguHqStaInd);
984 #if defined(SPLIT_RLC_DL_TASK) && defined(MAC_RLC_HARQ_STA_RBUF)
985    S16 ret=ROK;
986    ret = RgUiRguHqStaIndRbuf(pst,suId,harqStatusInd);
987    RETVALUE(ret);
988 #else 
989    RETVALUE((*RgUiRguHqStaIndMt[pst->selector])(pst, suId, harqStatusInd));
990 #endif 
991
992 } /* RgUiRguHqStaInd */
993 #endif /* LTE_L2_MEAS */
994
995 #ifdef ANSI
996 PUBLIC S16 RgUiRguFlowCntrlInd
997 (
998 Pst* pst,
999 SuId suId,
1000 RguFlowCntrlInd *flowCntrlInd
1001 )
1002 #else
1003 PUBLIC S16 RgUiRguFlowCntrlInd(pst, suId, harqStatusInd)
1004 Pst* pst;
1005 SuId suId;
1006 RguFlowCntrlInd *flowCntrlInd;
1007 #endif
1008 {
1009   RETVALUE((*RgUiRguFlowCntrlIndMt[pst->selector])(pst, suId, flowCntrlInd));
1010 }
1011 /* Added for SI Enhancement*/
1012 #ifdef RGR_SI_SCH
1013 /**
1014 * @brief SI Configuration Confirm from MAC to RRM
1015 *
1016 * @details
1017 *
1018 *     Function : RgUiRgrSiCfgCfm
1019 *
1020 *  @param[in]   Pst*  pst
1021 *  @param[in]   SuId  suId
1022 *  @param[in]   RgrCfgTransId  transId
1023 *  @param[in]   U8  status
1024 *  @return   S16
1025 *      -# ROK
1026 **/
1027 #ifdef ANSI
1028 PUBLIC S16 RgUiRgrSiCfgCfm
1029 (
1030 Pst* pst,
1031 SuId suId,
1032 RgrCfgTransId transId,
1033 U8 status
1034 )
1035 #else
1036 PUBLIC S16 RgUiRgrSiCfgCfm(pst, suId, transId, status)
1037 Pst* pst;
1038 SuId suId;
1039 RgrCfgTransId transId;
1040 U8 status;
1041 #endif
1042 {
1043
1044    TRC3(RgUiRgrSiCfgCfm);
1045
1046    RETVALUE((*RgUiRgrSiCfgCfmMt[pst->selector])(pst, suId, transId, status));
1047
1048 }
1049
1050 /**
1051 * @brief Warning SI Configuration Confirm from MAC to RRM
1052 *
1053 * @details
1054 *
1055 *     Function : RgUiRgrWarningSiCfgCfm
1056 *
1057 *  @param[in]   Pst*  pst
1058 *  @param[in]   SuId  suId
1059 *  @param[in]   RgrCfgTransId  transId
1060 *  @param[in]   U8   siId
1061 *  @param[in]   U8  status
1062 *  @return   S16
1063 *      -# ROK
1064 **/
1065 #ifdef ANSI
1066 PUBLIC S16 RgUiRgrWarningSiCfgCfm
1067 (
1068 Pst* pst,
1069 SuId suId,
1070 RgrCfgTransId transId,
1071 U8   siId,
1072 U8 status
1073 )
1074 #else
1075 PUBLIC S16 RgUiRgrWarningSiCfgCfm(pst, suId, transId, siId,status)
1076 Pst* pst;
1077 SuId suId;
1078 RgrCfgTransId transId;
1079 U8  siId;
1080 U8 status;
1081 #endif
1082 {
1083    TRC3(RgUiRgrWarningSiCfgCfm);
1084
1085    RETVALUE((*RgUiRgrWarningSiCfgCfmMt[pst->selector])
1086          (pst, suId, transId, siId, status));
1087 }
1088
1089 #endif/*RGR_SI_SCH*/
1090
1091 \f
1092 /* ccpu00117452 - MOD - Changed macro name from
1093    RGR_RRM_DLPWR_CNTRL to RGR_CQI_REPT */
1094 #ifdef RGR_CQI_REPT
1095 /**
1096 * @brief STA indication from MAC to RGR user.
1097 *
1098 * @details
1099 *
1100 *     Function : RgUiRgrStaInd
1101 *
1102 *  @param[in]   Pst*  pst
1103 *  @param[in]   SuId  suId
1104 *  @param[in]   RgrStaIndInfo  *staInd
1105 *  @return   S16
1106 *      -# ROK
1107 **/
1108 #ifdef ANSI
1109 PUBLIC S16 RgUiRgrStaInd
1110 (
1111 Pst* pst,
1112 SuId suId,
1113 RgrStaIndInfo  *staInd
1114 )
1115 #else
1116 PUBLIC S16 RgUiRgrStaInd(pst, suId, staInd)
1117 Pst* pst;
1118 SuId suId;
1119 RgrStaIndInfo *staInd;
1120 #endif
1121 {
1122
1123    TRC3(RgUiRgrStaInd);
1124
1125    RETVALUE((*RgUiRgrStaIndMt[pst->selector])(pst, suId, staInd));
1126
1127 }
1128 #endif /* End of RGR_CQI_REPT */
1129
1130 /* LTE_ADV_FLAG_REMOVED_START */
1131 /**
1132  * @brief LOAD INF indication from MAC to RGR user.
1133  *
1134  * @details
1135  *
1136  *     Function : RgUiRgrLoadInfInd
1137  *
1138  *  @param[in]   Pst*  pst
1139  *  @param[in]   SuId  suId
1140  *  @param[in]   RgrLoadInfIndInfo  *loadInfInd
1141  *  @return   S16
1142  *      -# ROK
1143  **/
1144 #ifdef ANSI
1145 PUBLIC S16 RgUiRgrLoadInfInd
1146 (
1147  Pst* pst,
1148  SuId suId,
1149  RgrLoadInfIndInfo  *loadInfInd
1150  )
1151 #else
1152 PUBLIC S16 RgUiRgrLoadInfInd(pst, suId, loadInfInd)
1153    Pst* pst;
1154    SuId suId;
1155    RgrLoadInfIndInfo *loadInfInd;
1156 #endif
1157 {
1158
1159    TRC3(RgUiRgrLoadInfInd);
1160
1161    RETVALUE((*RgUiRgrLoadInfIndMt[pst->selector])(pst, suId, loadInfInd));
1162
1163 }
1164 /* LTE_ADV_FLAG_REMOVED_END */
1165
1166 /**
1167 * @brief UESTA indication from MAC to RGR user.
1168 *
1169 * @details
1170 *
1171 *     Function : RgUiRgrUeStaInd
1172 *
1173 *  @param[in]   Pst*  pst
1174 *  @param[in]   SuId  suId
1175 *  @param[in]   RgrStaIndInfo  *staInd
1176 *  @return   S16
1177 *      -# ROK
1178 **/
1179 #ifdef ANSI
1180 PUBLIC S16 RgUiRgrUeStaInd
1181 (
1182 Pst             *pst,
1183 SuId            suId,
1184 RgrUeStaIndInfo *ueStaInd
1185 )
1186 #else
1187 PUBLIC S16 RgUiRgrUeStaInd(pst, suId, ueStaInd)
1188 Pst             *pst;
1189 SuId            suId;
1190 RgrUeStaIndInfo *ueStaInd;
1191 #endif
1192 {
1193
1194    TRC3(RgUiRgrUeStaInd);
1195
1196    RETVALUE((*RgUiRgrUeStaIndMt[pst->selector])(pst, suId, ueStaInd));
1197
1198 }
1199 #endif /*--ifdef RG--*/
1200
1201 #ifdef PTRGUICRG
1202 \f
1203 /**
1204 * @brief Confirmation from MAC to RRC for the bind/Unbind 
1205  * request for the interface saps
1206 *
1207 * @details
1208 *
1209 *     Function : PtUiCrgBndCfm
1210 *
1211 *  @param[in]   Pst*  pst
1212 *  @param[in]   SuId  suId
1213 *  @param[in]   U8  status
1214 *  @return   S16
1215 *      -# ROK
1216 **/
1217 #ifdef ANSI
1218 PUBLIC S16 PtUiCrgBndCfm
1219 (
1220 Pst* pst,
1221 SuId suId,
1222 U8 status
1223 )
1224 #else
1225 PUBLIC S16 PtUiCrgBndCfm(pst, suId, status)
1226 Pst* pst;
1227 SuId suId;
1228 U8 status;
1229 #endif
1230 {
1231
1232    TRC3(PtUiCrgBndCfm);
1233
1234    UNUSED(pst);
1235    UNUSED(suId);
1236    UNUSED(status);
1237
1238    RETVALUE(ROK);
1239
1240 }
1241
1242
1243 \f
1244 /**
1245 * @brief Configuration Confirm from MAC to RRC
1246 *
1247 * @details
1248 *
1249 *     Function : PtUiCrgCfgCfm
1250 *
1251 *  @param[in]   Pst*  pst
1252 *  @param[in]   SuId  suId
1253 *  @param[in]   CrgCfgTransId  transId
1254 *  @param[in]   U8  status
1255 *  @return   S16
1256 *      -# ROK
1257 **/
1258 #ifdef ANSI
1259 PUBLIC S16 PtUiCrgCfgCfm
1260 (
1261 Pst* pst,
1262 SuId suId,
1263 CrgCfgTransId transId,
1264 U8 status
1265 )
1266 #else
1267 PUBLIC S16 PtUiCrgCfgCfm(pst, suId, transId, status)
1268 Pst* pst;
1269 SuId suId;
1270 CrgCfgTransId transId;
1271 U8 status;
1272 #endif
1273 {
1274
1275    TRC3(PtUiCrgCfgCfm);
1276
1277    UNUSED(pst);
1278    UNUSED(suId);
1279    UNUSED(transId);
1280    UNUSED(status);
1281
1282    RETVALUE(ROK);
1283
1284 }
1285 #endif /*--ifdef PTRGUICRG--*/
1286
1287 #ifdef PTRGUIRGU
1288 \f
1289 /**
1290 * @brief Confirmation from MAC to RLC for the bind/Unbind 
1291  * request for the interface saps
1292 *
1293 * @details
1294 *
1295 *     Function : PtUiRguBndCfm
1296 *
1297 *  @param[in]   Pst*  pst
1298 *  @param[in]   SuId  suId
1299 *  @param[in]   U8  status
1300 *  @return   S16
1301 *      -# ROK
1302 **/
1303 #ifdef ANSI
1304 PUBLIC S16 PtUiRguBndCfm
1305 (
1306 Pst* pst,
1307 SuId suId,
1308 U8 status
1309 )
1310 #else
1311 PUBLIC S16 PtUiRguBndCfm(pst, suId, status)
1312 Pst* pst;
1313 SuId suId;
1314 U8 status;
1315 #endif
1316 {
1317
1318    TRC3(PtUiRguBndCfm);
1319
1320    UNUSED(pst);
1321    UNUSED(suId);
1322    UNUSED(status);
1323
1324    RETVALUE(ROK);
1325
1326 }
1327
1328
1329 \f
1330 /**
1331 * @brief Data Indication from MAC to RLC to 
1332  * forward the data received for common channels
1333 *
1334 * @details
1335 *
1336 *     Function : PtUiRguCDatInd
1337 *
1338 *  @param[in]   Pst*  pst
1339 *  @param[in]   SuId  suId
1340 *  @param[in]   RguCDatIndInfo  *  datInd
1341 *  @return   S16
1342 *      -# ROK
1343 **/
1344 #ifdef ANSI
1345 PUBLIC S16 PtUiRguCDatInd
1346 (
1347 Pst* pst,
1348 SuId suId,
1349 RguCDatIndInfo  * datInd
1350 )
1351 #else
1352 PUBLIC S16 PtUiRguCDatInd(pst, suId, datInd)
1353 Pst* pst;
1354 SuId suId;
1355 RguCDatIndInfo  * datInd;
1356 #endif
1357 {
1358
1359    TRC3(PtUiRguCDatInd);
1360
1361    UNUSED(pst);
1362    UNUSED(suId);
1363    UNUSED(datInd);
1364
1365    RETVALUE(ROK);
1366
1367 }
1368
1369
1370 \f
1371 /**
1372 * @brief Data Indication from MAC to RLC to 
1373  * forward the data received for dedicated channels
1374 *
1375 * @details
1376 *
1377 *     Function : PtUiRguDDatInd
1378 *
1379 *  @param[in]   Pst*  pst
1380 *  @param[in]   SuId  suId
1381 *  @param[in]   RguDDatIndInfo  *  datInd
1382 *  @return   S16
1383 *      -# ROK
1384 **/
1385 #ifdef ANSI
1386 PUBLIC S16 PtUiRguDDatInd
1387 (
1388 Pst* pst,
1389 SuId suId,
1390 RguDDatIndInfo  * datInd
1391 )
1392 #else
1393 PUBLIC S16 PtUiRguDDatInd(pst, suId, datInd)
1394 Pst* pst;
1395 SuId suId;
1396 RguDDatIndInfo  * datInd;
1397 #endif
1398 {
1399
1400    TRC3(PtUiRguDDatInd);
1401
1402    UNUSED(pst);
1403    UNUSED(suId);
1404    UNUSED(datInd);
1405
1406    RETVALUE(ROK);
1407
1408 }
1409
1410
1411 \f
1412 /**
1413 * @brief Status Indication from MAC to RLC  
1414  * as a response to the staRsp primitive from RLC.
1415  * Informs RLC of the totalBufferSize and Timing Info 
1416  * for the transmission on common channels.
1417 *
1418 * @details
1419 *
1420 *     Function : PtUiRguCStaInd
1421 *
1422 *  @param[in]   Pst*  pst
1423 *  @param[in]   SuId  suId
1424 *  @param[in]   RguCStaIndInfo  *  staInd
1425 *  @return   S16
1426 *      -# ROK
1427 **/
1428 #ifdef ANSI
1429 PUBLIC S16 PtUiRguCStaInd
1430 (
1431 Pst* pst,
1432 SuId suId,
1433 RguCStaIndInfo  * staInd
1434 )
1435 #else
1436 PUBLIC S16 PtUiRguCStaInd(pst, suId, staInd)
1437 Pst* pst;
1438 SuId suId;
1439 RguCStaIndInfo  * staInd;
1440 #endif
1441 {
1442
1443    TRC3(PtUiRguCStaInd);
1444
1445    UNUSED(pst);
1446    UNUSED(suId);
1447    UNUSED(staInd);
1448
1449    RETVALUE(ROK);
1450
1451 }
1452
1453
1454 \f
1455 /**
1456 * @brief Status Indication from MAC to RLC  
1457  * as a response to the staRsp primitive from RLC.
1458  * Informs RLC of the totalBufferSize and Timing Info 
1459  * for the transmission on dedicated channels.
1460 *
1461 * @details
1462 *
1463 *     Function : PtUiRguDStaInd
1464 *
1465 *  @param[in]   Pst*  pst
1466 *  @param[in]   SuId  suId
1467 *  @param[in]   RguDStaIndInfo  *  staInd
1468 *  @return   S16
1469 *      -# ROK
1470 **/
1471 #ifdef ANSI
1472 PUBLIC S16 PtUiRguDStaInd
1473 (
1474 Pst* pst,
1475 SuId suId,
1476 RguDStaIndInfo  * staInd
1477 )
1478 #else
1479 PUBLIC S16 PtUiRguDStaInd(pst, suId, staInd)
1480 Pst* pst;
1481 SuId suId;
1482 RguDStaIndInfo  * staInd;
1483 #endif
1484 {
1485
1486    TRC3(PtUiRguDStaInd);
1487
1488    UNUSED(pst);
1489    UNUSED(suId);
1490    UNUSED(staInd);
1491
1492    RETVALUE(ROK);
1493
1494 }
1495 #ifdef LTE_L2_MEAS
1496 /* TODO: Function Header */
1497 #ifdef ANSI
1498 PUBLIC S16 PtUiRguHqStaInd
1499 (
1500 Pst* pst,
1501 SuId suId,
1502 RguHarqStatusInd *harqStatusInd
1503 )
1504 #else
1505 PUBLIC S16 PtUiRguHqStaInd(pst, suId, harqStatusInd)
1506 Pst* pst;
1507 SuId suId;
1508 RguHarqStatusInd *harqStatusInd;
1509 #endif
1510 {
1511
1512    TRC3(PtUiRguHqStaInd);
1513
1514    UNUSED(pst);
1515    UNUSED(suId);
1516    UNUSED(harqStatusInd);
1517
1518    RETVALUE(ROK);
1519
1520 }
1521 #endif /* LTE_L2_MEAS */
1522
1523 #ifdef ANSI
1524 PUBLIC S16 PtUiRguFlowCntrlInd
1525 (
1526 Pst* pst,
1527 SuId suId,
1528 RguFlowCntrlInd *flowCntrlInd
1529 )
1530 #else
1531 PUBLIC S16 PtUiRguFlowCntrlInd(pst, suId, flowCntrlInd)
1532 Pst* pst;
1533 SuId suId;
1534 RguHarqStatusInd *flowCntrlInd;
1535 #endif
1536 {
1537
1538    TRC3(PtUiRguFlowCntrlInd);
1539
1540    UNUSED(pst);
1541    UNUSED(suId);
1542    UNUSED(flowCntrlInd);
1543
1544    RETVALUE(ROK);
1545
1546 }
1547 \f
1548 #endif /*--ifdef PTRGUIRGU--*/
1549
1550 #ifdef PTRGUIRGR
1551 \f
1552 /**
1553 * @brief Confirmation from MAC to RRM for the bind/Unbind 
1554  * request for the interface saps
1555 *
1556 * @details
1557 *
1558 *     Function : PtUiRgrBndCfm
1559 *
1560 *  @param[in]   Pst*  pst
1561 *  @param[in]   SuId  suId
1562 *  @param[in]   U8  status
1563 *  @return   S16
1564 *      -# ROK
1565 **/
1566 #ifdef ANSI
1567 PUBLIC S16 PtUiRgrBndCfm
1568 (
1569 Pst* pst,
1570 SuId suId,
1571 U8 status
1572 )
1573 #else
1574 PUBLIC S16 PtUiRgrBndCfm(pst, suId, status)
1575 Pst* pst;
1576 SuId suId;
1577 U8 status;
1578 #endif
1579 {
1580
1581    TRC3(PtUiRgrBndCfm);
1582
1583    UNUSED(pst);
1584    UNUSED(suId);
1585    UNUSED(status);
1586
1587    RETVALUE(ROK);
1588
1589 }
1590
1591 /* Added for sending TTI tick to RRM */
1592 \f
1593 /**
1594 * @brief TTI indication from MAC to RGR user.
1595 *
1596 * @details
1597 *
1598 *     Function : PtUiRgrTtiInd
1599 *
1600 *  @param[in]   Pst*  pst
1601 *  @param[in]   SuId  suId
1602 *  @param[in]   RgrTtiIndInfo  *ttiInd
1603 *  @return   S16
1604 *      -# ROK
1605 **/
1606 #ifdef ANSI
1607 PUBLIC S16 PtUiRgrTtiInd
1608 (
1609 Pst* pst,
1610 SuId suId,
1611 RgrTtiIndInfo *ttiInd
1612 )
1613 #else
1614 PUBLIC S16 PtUiRgrTtiInd(pst, suId, ttiInd)
1615 Pst* pst;
1616 SuId suId;
1617 RgrTtiIndInfo *ttiInd;
1618 #endif
1619 {
1620
1621    TRC3(PtUiRgrTtiInd);
1622
1623    UNUSED(pst);
1624    UNUSED(suId);
1625    UNUSED(ttiInd);
1626
1627    RETVALUE(ROK);
1628
1629 }
1630
1631
1632 \f
1633 /**
1634 * @brief Configuration Confirm from MAC to RRM
1635 *
1636 * @details
1637 *
1638 *     Function : PtUiRgrCfgCfm
1639 *
1640 *  @param[in]   Pst*  pst
1641 *  @param[in]   SuId  suId
1642 *  @param[in]   RgrCfgTransId  transId
1643 *  @param[in]   U8  status
1644 *  @return   S16
1645 *      -# ROK
1646 **/
1647 #ifdef ANSI
1648 PUBLIC S16 PtUiRgrCfgCfm
1649 (
1650 Pst* pst,
1651 SuId suId,
1652 RgrCfgTransId transId,
1653 U8 status
1654 )
1655 #else
1656 PUBLIC S16 PtUiRgrCfgCfm(pst, suId, transId, status)
1657 Pst* pst;
1658 SuId suId;
1659 RgrCfgTransId transId;
1660 U8 status;
1661 #endif
1662 {
1663
1664    TRC3(PtUiRgrCfgCfm);
1665
1666    UNUSED(pst);
1667    UNUSED(suId);
1668    UNUSED(transId);
1669    UNUSED(status);
1670
1671    RETVALUE(ROK);
1672
1673 }
1674
1675 /* Added for SI Enhancement*/
1676 #ifdef RGR_SI_SCH
1677 /**
1678 * @brief SI Configuration Confirm from MAC to RRM
1679 *
1680 * @details
1681 *
1682 *     Function : PtUiRgrSiCfgCfm
1683 *
1684 *  @param[in]   Pst*  pst
1685 *  @param[in]   SuId  suId
1686 *  @param[in]   RgrCfgTransId  transId
1687 *  @param[in]   U8  status
1688 *  @return   S16
1689 *      -# ROK
1690 **/
1691 #ifdef ANSI
1692 PUBLIC S16 PtUiRgrSiCfgCfm
1693 (
1694 Pst* pst,
1695 SuId suId,
1696 RgrCfgTransId transId,
1697 U8 status
1698 )
1699 #else
1700 PUBLIC S16 PtUiRgrSiCfgCfm(pst, suId, transId, status)
1701 Pst* pst;
1702 SuId suId;
1703 RgrCfgTransId transId;
1704 U8 status;
1705 #endif
1706 {
1707
1708    TRC3(PtUiRgrSiCfgCfm);
1709
1710    UNUSED(pst);
1711    UNUSED(suId);
1712    UNUSED(transId);
1713    UNUSED(status);
1714
1715    RETVALUE(ROK);
1716
1717 }
1718
1719 /**
1720 * @brief Warning SI Configuration Confirm from MAC to RRM
1721 *
1722 * @details
1723 *
1724 *     Function : PtUiRgrWarningSiCfgCfm
1725 *
1726 *  @param[in]   Pst*  pst
1727 *  @param[in]   SuId  suId
1728 *  @param[in]   RgrCfgTransId  transId
1729 *  @param[in]   U8 siId
1730 *  @param[in]   U8  status
1731 *  @return   S16
1732 *      -# ROK
1733 **/
1734 #ifdef ANSI
1735 PUBLIC S16 PtUiRgrWarningSiCfgCfm
1736 (
1737 Pst* pst,
1738 SuId suId,
1739 RgrCfgTransId transId,
1740 U8 siId,
1741 U8 status
1742 )
1743 #else
1744 PUBLIC S16 PtUiRgrWarningSiCfgCfm(pst, suId, transId, siId, status)
1745 Pst* pst;
1746 SuId suId;
1747 RgrCfgTransId transId;
1748 U8  siId;
1749 U8 status;
1750 #endif
1751 {
1752    TRC3(PtUiRgrWarningSiCfgCfm);
1753
1754    UNUSED(pst);
1755    UNUSED(suId);
1756    UNUSED(transId);
1757    UNUSED(siId);
1758    UNUSED(status);
1759
1760    RETVALUE(ROK);
1761 }
1762 #endif/* RGR_SI_SCH */
1763
1764 \f
1765 /* ccpu00117452 - MOD - Changed macro name from
1766    RGR_RRM_DLPWR_CNTRL to RGR_CQI_REPT */
1767 #ifdef RGR_CQI_REPT
1768 /**
1769 * @brief STA indication from MAC to RGR user.
1770 *
1771 * @details
1772 *
1773 *     Function : PtUiRgrStaInd
1774 *
1775 *  @param[in]   Pst*  pst
1776 *  @param[in]   SuId  suId
1777 *  @param[in]   RgrStaIndInfo  *staInd
1778 *  @return   S16
1779 *      -# ROK
1780 **/
1781 #ifdef ANSI
1782 PUBLIC S16 PtUiRgrStaInd
1783 (
1784 Pst* pst,
1785 SuId suId,
1786 RgrStaIndInfo  *staInd
1787 )
1788 #else
1789 PUBLIC S16 PtUiRgrStaInd(pst, suId, staInd)
1790 Pst* pst;
1791 SuId suId;
1792 RgrStaIndInfo *staInd;
1793 #endif
1794 {
1795
1796    TRC3(PtUiRgrStaInd);
1797
1798    UNUSED(pst);
1799    UNUSED(suId);
1800    UNUSED(staInd);
1801
1802    RETVALUE(ROK);
1803
1804 }
1805 #endif /* End of RGR_CQI_REPT */
1806 /* LTE_ADV_FLAG_REMOVED_START */
1807 /**
1808  * @brief LOAD INF indication from MAC to RGR user.
1809  *
1810  * @details
1811  *
1812  *     Function : PtUiRgrLoadInfInd
1813  *
1814  *  @param[in]   Pst*  pst
1815  *  @param[in]   SuId  suId
1816  *  @param[in]   RgrLoadInfIndInfo  *loadInfInd
1817  *  @return   S16
1818  *      -# ROK
1819  **/
1820 #ifdef ANSI
1821 PUBLIC S16 PtUiRgrLoadInfInd
1822 (
1823  Pst* pst,
1824  SuId suId,
1825  RgrLoadInfIndInfo  *loadInfInd
1826  )
1827 #else
1828 PUBLIC S16 PtUiRgrLoadInfInd(pst, suId, loadInfInd)
1829    Pst* pst;
1830    SuId suId;
1831    RgrLoadInfIndInfo *loadInfInd;
1832 #endif
1833 {
1834
1835    TRC3(PtUiRgrLoadInfInd);
1836
1837    UNUSED(pst);
1838    UNUSED(suId);
1839    UNUSED(loadInfInd);
1840
1841    RETVALUE(ROK);
1842
1843 }
1844 /* LTE_ADV_FLAG_REMOVED_END */
1845
1846 /**
1847 * @brief STA indication from MAC to RGR user.
1848 *
1849 * @details
1850 *
1851 *     Function : PtUiRgrUeStaInd
1852 *
1853 *  @param[in]   Pst*  pst
1854 *  @param[in]   SuId  suId
1855 *  @param[in]   RgrUeStaIndInfo  *ueStaInd
1856 *  @return   S16
1857 *      -# ROK
1858 **/
1859 #ifdef ANSI
1860 PUBLIC S16 PtUiRgrUeStaInd
1861 (
1862 Pst* pst,
1863 SuId suId,
1864 RgrUeStaIndInfo  *ueStaInd
1865 )
1866 #else
1867 PUBLIC S16 PtUiRgrUeStaInd(pst, suId, ueStaInd)
1868 Pst* pst;
1869 SuId suId;
1870 RgrUeStaIndInfo *ueStaInd;
1871 #endif
1872 {
1873
1874    TRC3(PtUiRgrUeStaInd);
1875
1876    UNUSED(pst);
1877    UNUSED(suId);
1878    UNUSED(ueStaInd);
1879
1880    RETVALUE(ROK);
1881
1882 }
1883 #endif /*--ifdef PTRGUIRGR--*/
1884
1885
1886 #ifdef PTRGUIRGM
1887 /**
1888 * @brief Confirmation from MAC to RRM for the bind/Unbind 
1889  * request for the interface saps via RGM interface
1890 *
1891 * @details
1892 *
1893 *     Function : PtUiRgmBndCfm
1894 *
1895 *  @param[in]   Pst*  pst
1896 *  @param[in]   SuId  suId
1897 *  @param[in]   U8  status
1898 *  @return   S16
1899 *      -# ROK
1900 **/
1901 #ifdef ANSI
1902 PUBLIC S16 PtUiRgmBndCfm
1903 (
1904 Pst* pst,
1905 SuId suId,
1906 U8 status
1907 )
1908 #else
1909 PUBLIC S16 PtUiRgmBndCfm(pst, suId, status)
1910 Pst* pst;
1911 SuId suId;
1912 U8 status;
1913 #endif
1914 {
1915
1916    TRC3(PtUiRgmBndCfm);
1917
1918    UNUSED(pst);
1919    UNUSED(suId);
1920    UNUSED(status);
1921
1922    RETVALUE(ROK);
1923
1924 }
1925
1926 /**
1927 * @brief Average PRB indication from MAC to RRM
1928 *
1929 * @details
1930 *
1931 *     Function : PtUiRgmPrbRprtInd
1932 *
1933 *  @param[in]   Pst*  pst
1934 *  @param[in]   SuId  suId
1935 *  @param[in]   RgrUeStaIndInfo  *ueStaInd
1936 *  @return   S16
1937 *      -# ROK
1938 **/
1939 #ifdef ANSI
1940 PUBLIC S16 PtUiRgmPrbRprtInd
1941 (
1942 Pst* pst,
1943 SuId suId,
1944 RgmPrbRprtInd *prbRprtInd
1945 )
1946 #else
1947 PUBLIC S16 PtUiRgmPrbRprtInd(pst, suId, prbRprtInd)
1948 Pst* pst;
1949 SuId suId;
1950 RgmPrbRprtInd *prbRprtInd;
1951 #endif
1952 {
1953
1954    TRC3(PtUiRgmPrbRprtInd);
1955
1956    UNUSED(pst);
1957    UNUSED(suId);
1958    UNUSED(prbRprtInd);
1959
1960    RETVALUE(ROK);
1961
1962 }
1963
1964 /**
1965 * @brief Transmission Mode Change indication from MAC to RRM
1966 *
1967 * @details
1968 *
1969 *     Function : PtUiRgmTransModeInd
1970 *
1971 *  @param[in]   Pst*  pst
1972 *  @param[in]   SuId  suId
1973 *  @param[in]   RgmTransModeInd *transModeInd
1974 *  @return   S16
1975 *      -# ROK
1976 **/
1977 #ifdef ANSI
1978 PUBLIC S16 PtUiRgmTransModeInd
1979 (
1980 Pst* pst,
1981 SuId suId,
1982 RgmTransModeInd *transModeInd
1983 )
1984 #else
1985 PUBLIC S16 PtUiRgmTransModeInd(pst, suId, transModeInd)
1986 Pst* pst;
1987 SuId suId;
1988 RgmTransModeInd *transModeInd;
1989 #endif
1990 {
1991
1992    TRC3(PtUiRgmTransModeInd);
1993
1994    UNUSED(pst);
1995    UNUSED(suId);
1996    UNUSED(transModeInd);
1997
1998    RETVALUE(ROK);
1999
2000 }
2001 #endif
2002
2003 /**
2004 * @brief Average PRB indication from MAC to RRM
2005 *
2006 * @details
2007 *
2008 *     Function : RgUiRgmSendPrbRprtInd
2009 *
2010 *  @param[in]   Pst*  pst
2011 *  @param[in]   SuId  suId
2012 *  @param[in]   RgmPrbRprtInd prbRprtInd
2013 *  @return   S16
2014 *      -# ROK
2015 **/
2016 #ifdef ANSI
2017 PUBLIC S16 RgUiRgmSendPrbRprtInd
2018 (
2019 Pst* pst,
2020 SuId suId,
2021 RgmPrbRprtInd *prbRprtInd
2022 )
2023 #else
2024 PUBLIC S16 RgUiRgmSendPrbRprtInd(pst, suId, prbRprtInd)
2025 Pst* pst;
2026 SuId suId;
2027 RgmPrbRprtInd *prbRprtInd;
2028 #endif
2029
2030 {
2031    TRC2(RgUiRgmSendPrbRprtInd);
2032    RETVALUE((*RgUiRgmSendPrbRprtIndMt[pst->selector])(pst, suId, prbRprtInd));
2033 }
2034
2035 /**
2036 * @brief Transmission Mode change indication from MAC to RRM
2037 *
2038 * @details
2039 *
2040 *     Function : RgUiRgmChangeTransModeInd
2041 *
2042 *  @param[in]   Pst*  pst
2043 *  @param[in]   SuId  suId
2044 *  @param[in]   RgmTransModeInd transModeInd
2045 *  @return   S16
2046 *      -# ROK
2047 **/
2048 #ifdef ANSI
2049 PUBLIC S16 RgUiRgmChangeTransModeInd
2050 (
2051 Pst* pst,
2052 SuId suId,
2053 RgmTransModeInd *transModeInd
2054 )
2055 #else
2056 PUBLIC S16 RgUiRgmChangeTransModeInd(pst, suId, transModeInd)
2057 Pst* pst;
2058 SuId suId;
2059 RgmTransModeInd *transModeInd;
2060 #endif
2061
2062 {
2063    TRC2(RgUiRgmChangeTransModeInd);
2064    RETVALUE((*RgUiRgmChangeTransModeIndMt[pst->selector])(pst, suId, transModeInd));
2065 }
2066
2067 #if defined(MAC_RLC_UL_RBUF) && !defined(SS_RBUF)
2068 PRIVATE S16 RgUiRguDDatIndRbuf(RguDDatIndInfo  *datInd)
2069 {
2070       S16  ret = ROK;
2071       Void *elem = NULLP;
2072       RguDedDatInd1 *rguDatIndl = NULLP;
2073       elem = SRngGetWIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
2074       rguDatIndl = (RguDedDatInd1 *) elem;
2075       if (NULLP == elem)
2076       {
2077          SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].pktDrop++;
2078          U32 i,j;
2079          for(i = 0; i< datInd->numLch; i++)
2080          {
2081             for(j = 0; j < datInd->lchData[i].pdu.numPdu; j++)
2082             {
2083                if(datInd->lchData[i].pdu.mBuf[j])
2084                {
2085                   SPutMsg(datInd->lchData[i].pdu.mBuf[j]);
2086                }
2087             }
2088          }
2089          rgFreeSharableSBuf((Data **)&datInd,sizeof(RguDDatIndInfo));
2090          ret = RFAILED;
2091       }
2092       else
2093       {
2094          rguDatIndl->msg = datInd;
2095          SRngIncrWIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
2096          SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].pktRate++;
2097       }
2098   RETVALUE(ret);
2099 }
2100 #endif
2101 #ifdef RLC_MAC_DAT_REQ_RBUF
2102 #ifdef ANSI
2103 PUBLIC S16 rgDlDatReqBatchProc
2104 (
2105 Void
2106 )
2107 #else
2108 PUBLIC S16 rgDlDatReqBatchProc()
2109 Void;
2110 #endif
2111 {
2112 /* Read from Ring Buffer and process PDCP packets */
2113
2114    U8 rngBufDeqIndx = 0;
2115    PRIVATE Pst rgDDatRbfuPst ={1,1,ENTRG,0,ENTKW,1,PRIOR0,RTESPEC,EVTRGUDDATREQ,0,0,2,0};
2116    PRIVATE Pst rgCDatRbfuPst ={1,1,ENTRG,0,ENTKW,1,PRIOR0,RTESPEC,EVTRGUCDATREQ,0,0,2,0};
2117    Void *elmIndx = NULLP;
2118    RguInfoRingElem *datReqRing=NULLP;
2119    elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
2120    while(NULLP != elmIndx)
2121    {
2122       datReqRing= (RguInfoRingElem *)elmIndx;
2123       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].nPktProc++;;//Number of pkt processed in tti
2124       if(datReqRing->msg)
2125       {
2126          if(datReqRing->event == EVTRGUDDATREQ)
2127          {
2128          RgUiRguDDatReq(&rgDDatRbfuPst, datReqRing->spId, (RguDDatReqInfo *) datReqRing->msg);
2129          }
2130          else
2131          { 
2132           //  printf("CSHP:*** Received CDatReq in MAC Ring  \n");
2133          RgUiRguCDatReq(&rgCDatRbfuPst, datReqRing->spId, (RguCDatReqInfo *) datReqRing->msg); 
2134          }
2135       }
2136       else
2137       {
2138               printf(" Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->read,
2139               SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->write);
2140               /* Due to the cache issue we are verifying the mbuf pointer again and sending it to rlc if avilable*/
2141               if(datReqRing->msg)
2142               {
2143                       if(datReqRing->event == EVTRGUDDATREQ)
2144                               RgUiRguDDatReq(&rgDDatRbfuPst, datReqRing->spId, (RguDDatReqInfo *) datReqRing->msg);
2145                       else 
2146                               RgUiRguCDatReq(&rgCDatRbfuPst, datReqRing->spId, (RguCDatReqInfo *) datReqRing->msg); 
2147               }else 
2148               {
2149                       printf(" still Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->read,
2150                       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->write);
2151               } 
2152       }
2153       datReqRing->msg=NULLP;
2154       SRngIncrRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
2155       datReqRing->event=0; 
2156       elmIndx = NULLP;
2157       datReqRing= NULLP;
2158       rngBufDeqIndx++;
2159
2160       if(rngBufDeqIndx >= SS_RNG_MAX_DLRLC_TO_DLMAC_DAT_REQ_DQ_CNT)
2161         break;
2162
2163       if((elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ)) == NULLP)
2164       break;
2165    }
2166  
2167    RETVALUE(ROK);
2168 }
2169 #endif 
2170
2171 #ifdef RLC_MAC_STA_RSP_RBUF
2172 #ifdef ANSI
2173 PUBLIC S16 rgDlStaRspBatchProc
2174 (
2175 Void
2176 )
2177 #else
2178 PUBLIC S16 rgDlStaRspBatchProc()
2179 Void;
2180 #endif
2181 {
2182 /* Read from Ring Buffer and process PDCP packets */
2183
2184    U8 rngBufDeqIndx = 0;
2185    PRIVATE Pst rgDStaRbfuPst ={1,1,ENTRG,0,ENTKW,1,PRIOR0,RTESPEC,EVTRGUDSTARSP,0,0,2,0};
2186    PRIVATE Pst rgCStaRbfuPst ={1,1,ENTRG,0,ENTKW,1,PRIOR0,RTESPEC,EVTRGUCSTARSP,0,0,2,0};
2187    Void *elmIndx = NULLP;
2188    RguInfoRingElem *staRspRing=NULLP;
2189
2190    elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
2191    while(NULLP != elmIndx)
2192    {
2193       staRspRing= (RguInfoRingElem *)elmIndx;
2194       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].nPktProc++;;//Number of pkt processed in tti
2195       
2196       if(staRspRing->msg!= NULLP)
2197       {
2198          if( staRspRing->event == EVTRGUDSTARSP)
2199          {
2200          RgUiRguDStaRsp(&rgDStaRbfuPst, staRspRing->spId, (RguDStaRspInfo *) staRspRing->msg);
2201          }
2202          else
2203          {
2204          RgUiRguCStaRsp(&rgCStaRbfuPst, staRspRing->spId, (RguCStaRspInfo *) staRspRing->msg);
2205          } 
2206       }
2207       else
2208       {
2209               printf(" Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->read,
2210                               SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->write);
2211               /* Due to the cache issue we are verifying the mbuf pointer again and sending it to rlc if avilable*/
2212               if(staRspRing->msg!= NULLP)
2213               {
2214                       if( staRspRing->event == EVTRGUDSTARSP)
2215                               RgUiRguDStaRsp(&rgDStaRbfuPst, staRspRing->spId, (RguDStaRspInfo *) staRspRing->msg);
2216                       else  
2217                               RgUiRguCStaRsp(&rgCStaRbfuPst, staRspRing->spId, (RguCStaRspInfo *) staRspRing->msg);
2218               }else 
2219               {
2220                       printf(" still Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->read,
2221                                       SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->write);
2222               } 
2223       }
2224       staRspRing->msg=NULLP;
2225       SRngIncrRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
2226       staRspRing->event =0;    
2227       elmIndx = NULLP;
2228       staRspRing= NULLP;
2229
2230       rngBufDeqIndx++;
2231
2232       if(rngBufDeqIndx >= SS_RNG_MAX_DLRLC_TO_DLMAC_STA_RSP_DQ_CNT)
2233         break;
2234
2235       if((elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC)) == NULLP)
2236       break;
2237    }
2238  
2239    RETVALUE(ROK);
2240 }
2241 #endif 
2242 #ifdef LTE_L2_MEAS
2243 #ifdef MAC_RLC_HARQ_STA_RBUF
2244 #ifdef ANSI
2245 PUBLIC S16 RgUiRguHqStaIndRbuf 
2246 (
2247 Pst* pst,
2248 SuId suId,
2249 RguHarqStatusInd *harqStatusInd
2250 )
2251 #else
2252 PUBLIC S16 RgUiRguHqStaIndRbuf(pst, suId, harqStatusInd)
2253 Pst* pst;
2254 SuId suId;
2255 RguHarqStatusInd *harqStatusInd;
2256 #endif
2257 {
2258    S16  ret = ROK;
2259    Void *elem = NULLP;
2260    RguHarqStaInd *harqStaInd = NULLP;
2261    elem = SRngGetWIndx(SS_RNG_BUF_MAC_HARQ);
2262    harqStaInd = (RguHarqStaInd*) elem;
2263    if (NULLP == elem )
2264    {
2265       SsRngInfoTbl[SS_RNG_BUF_MAC_HARQ].pktDrop++;
2266       ret = RFAILED;
2267    }
2268    else
2269    {
2270       cmMemcpy((U8 *)&(harqStaInd->hqStatusInd), (U8 *)harqStatusInd, sizeof(RguHarqStatusInd));
2271       cmMemcpy((U8 *)&(harqStaInd->pst), (U8 *)pst, sizeof(Pst));
2272       SRngIncrWIndx(SS_RNG_BUF_MAC_HARQ);
2273       SsRngInfoTbl[SS_RNG_BUF_MAC_HARQ].pktRate++;
2274    }
2275    RETVALUE(ret);
2276 }
2277 #endif
2278 #endif
2279
2280 \f
2281 /**********************************************************************
2282  
2283          End of file
2284 **********************************************************************/