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