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