1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
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 #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
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 *******************************************************************************/
19 /********************************************************************20**
21 Name: LTE-RLC Layer - Lower Interface
25 Desc: C source code for the lower interface of LTE-RLC
29 *********************************************************************21*/
30 static const char* RLOG_MODULE_NAME="LIM";
31 static int RLOG_MODULE_ID=2048;
32 static int RLOG_FILE_ID=238;
34 @brief RLC Lower Interface
38 /* header (.h) include files */
39 #include "envopt.h" /* environment options */
40 #include "envdep.h" /* environment dependent */
41 #include "envind.h" /* environment independent */
43 #include "gen.h" /* general */
44 #include "ssi.h" /* system services */
45 #include "cm5.h" /* common timer defines */
46 #include "cm_tkns.h" /* common tokens defines */
47 #include "cm_mblk.h" /* common memory allocation library defines */
48 #include "cm_llist.h" /* common link list defines */
49 #include "cm_hash.h" /* common hash list defines */
50 #include "cm_lte.h" /* common LTE defines */
51 #include "lkw.h" /* LKW defines */
52 #include "ckw.h" /* CKW defines */
53 #include "kwu.h" /* KWU defines */
54 #include "rgu.h" /* RGU defines */
56 #include "cpj.h" /* CPJ defines */
57 #include "pju.h" /* PJU defines */
58 #include "lpj.h" /* LPJ defines */
61 #include "kw_env.h" /* RLC environment options */
62 #include "kw.h" /* RLC defines */
64 /* extern (.x) include files */
65 #include "gen.x" /* general */
66 #include "ssi.x" /* system services */
68 #include "cm5.x" /* common timer library */
69 #include "cm_tkns.x" /* common tokens */
70 #include "cm_mblk.x" /* common memory allocation */
71 #include "cm_llist.x" /* common link list */
72 #include "cm_hash.x" /* common hash list */
73 #include "cm_lte.x" /* common LTE includes */
74 #include "cm_lib.x" /* common memory allocation library */
75 #include "lkw.x" /* LKW */
76 #include "ckw.x" /* CKW */
77 #include "kwu.x" /* KWU */
78 #include "rgu.x" /* RGU */
80 #include "cpj.x" /* CPJ defines */
81 #include "pju.x" /* PJU defines */
82 #include "lpj.x" /* LPJ defines */
98 #endif /* __cplusplus */
102 #ifdef RLC_MAC_DAT_REQ_RBUF
103 PUBLIC S16 kwLiRguDatReqRbuf(Pst *Post,SpId spId,Void *datReq);
106 #ifdef RLC_MAC_STA_RSP_RBUF
107 PUBLIC S16 kwLiRguStaRspRbuf(Pst *Post,SpId spId,Void *staRsp);
109 #if defined(MAC_RLC_HARQ_STA_RBUF) && defined(LTE_L2_MEAS)
110 EXTERN S16 KwDlHarqStaBatchProc (Void);
114 /*********************************************************************
115 * Forward Declaration of RGU Porting Functions
116 ********************************************************************/
117 EXTERN S16 PtLiRguBndReq ARGS((
123 EXTERN S16 PtLiRguUbndReq ARGS ((
129 EXTERN S16 PtLiRguCDatReq ARGS ((
132 RguCDatReqInfo *datReq
135 EXTERN S16 PtLiRguDDatReq ARGS ((
138 RguDDatReqInfo *datReq
141 EXTERN S16 PtLiRguCStaRsp ARGS ((
144 RguCStaRspInfo *staRsp
147 EXTERN S16 PtLiRguDStaRsp ARGS ((
150 RguDStaRspInfo *staRsp
152 /* kw005.201 added support for L2 Measurement */
155 EXTERN S16 PtLiRguL2mUlThrpMeasReq ARGS ((
158 RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq
160 #endif /* LTE_RLC_R9 */
161 #endif /* LTE_L2_MEAS */
164 /*********************************************************************
165 * Primitives for RGU interface
166 ********************************************************************/
168 /* RGU Bind Request primitive */
170 PUBLIC RguBndReq kwLiRguBndReqMt[] =
173 cmPkRguBndReq, /* 0 - loosely coupled */
175 PtLiRguBndReq, /* 0 - loosely coupled, portable */
176 #endif /* LCRGUIRGU */
178 RgUiRguBndReq, /* 1 - tightly coupled, MAC */
180 PtLiRguBndReq, /* 1 - tightly coupled, portable */
183 cmPkRguBndReq, /* 0 - loosely coupled */
185 PtLiRguBndReq, /* 0 - loosely coupled, portable */
186 #endif /* LCRGUIRGU */
189 /* RGU Unbind Request primitive */
191 PUBLIC RguBndReq kwLiRguUbndReqMt[] =
194 cmPkRguUbndReq, /* 0 - loosely coupled */
196 PtLiRguUbndReq, /* 0 - loosely coupled, portable */
197 #endif /* LCRGUIRGU */
199 RgUiRguUbndReq, /* 1 - tightly coupled, MAC */
201 PtLiRguUbndReq, /* 1 - tightly coupled, portable */ /* RG */
204 cmPkRguUbndReq, /* 0 - loosely coupled */
206 PtLiRguUbndReq, /* 0 - loosely coupled, portable */
207 #endif /* LCRGUIRGU */
210 /* RGU Common Channel Data Request primitive */
212 PUBLIC RguCDatReq kwLiRguCDatReqMt[] =
215 cmPkRguCDatReq, /* 0 - loosely coupled */
217 PtLiRguCDatReq, /* 0 - loosely coupled, portable */
218 #endif /* LCRGUIRGU */
220 RgUiRguCDatReq, /* 1 - tightly coupled, MAC */
222 PtLiRguCDatReq, /* 1 - tightly coupled, portable */
225 cmPkRguCDatReq, /* 0 - loosely coupled */
227 PtLiRguCDatReq, /* 0 - loosely coupled, portable */
228 #endif /* LCRGUIRGU */
231 /* RGU Dedicated Channel Data Request primitive */
233 PUBLIC RguDDatReq kwLiRguDDatReqMt[] =
236 cmPkRguDDatReq, /* 0 - loosely coupled */
238 PtLiRguDDatReq, /* 0 - loosely coupled, portable */
239 #endif /* LCRGUIRGU */
241 RgUiRguDDatReq, /* 1 - tightly coupled, MAC */
243 PtLiRguDDatReq, /* 1 - tightly coupled, portable */
246 cmPkRguDDatReq, /* 0 - loosely coupled */
248 PtLiRguDDatReq, /* 0 - loosely coupled, portable */
249 #endif /* LCRGUIRGU */
252 /* RGU Common Channel Status Response primitive */
254 PUBLIC RguCStaRsp kwLiRguCStaRspMt[] =
257 cmPkRguCStaRsp, /* 0 - loosely coupled */
259 PtLiRguCStaRsp, /* 0 - loosely coupled, portable */
260 #endif /* LCRGUIRGU */
262 RgUiRguCStaRsp, /* 1 - tightly coupled, MAC */
264 PtLiRguCStaRsp, /* 1 - tightly coupled, portable */
267 cmPkRguCStaRsp, /* 0 - loosely coupled */
269 PtLiRguCStaRsp, /* 0 - loosely coupled, portable */
270 #endif /* LCRGUIRGU */
273 /* RGU Dedicated Channel Status Response primitive */
275 PUBLIC RguDStaRsp kwLiRguDStaRspMt[] =
278 cmPkRguDStaRsp, /* 0 - loosely coupled */
280 PtLiRguDStaRsp, /* 0 - loosely coupled, portable */
281 #endif /* LCRGUIRGU */
283 RgUiRguDStaRsp, /* 1 - tightly coupled, MAC */
285 PtLiRguDStaRsp, /* 1 - tightly coupled, portable */
288 cmPkRguDStaRsp, /* 0 - LWLC loosely coupled */
290 PtLiRguDStaRsp, /* 0 - LWLC loosely coupled, portable */
291 #endif /* LCRGUIRGU */
294 /* kw005.201 added support for L2 Measurement */
297 /* RGU L2 Measurement Ul Ip Throughput Measurement Request primitive */
299 PUBLIC RguL2MUlThrpMeasReq kwLiRguL2MUlThrpMeasReqMt[] =
302 cmPkRguL2MUlThrpMeasReq, /* 0 - loosely coupled */
304 PtLiRguL2mUlThrpMeasReq, /* 0 - loosely coupled, portable */
305 #endif /* LCRGUIRGU */
307 RgUiRguL2MUlThrpMeasReq, /* 1 - tightly coupled, MAC */
309 PtLiRguL2mUlThrpMeasReq, /* 1 - tightly coupled, portable */
312 #endif /* LTE_RLC_R9 */
313 #endif /* LTE_L2_MEAS */
315 /****************************************************************************
316 * RGU Interface Mt functions
317 ***************************************************************************/
322 * Handler for RGU SAP bind Request.
326 * This function is used by RLC to request for binding to
327 * MAC for accessing MAC services.This function binds MAC's
328 * SAP (identified by spId) with the service user's SAP
329 * (identified by suId).
331 * @param[in] pst Post structure
332 * @param[in] suId Service user SAP ID
333 * @param[in] spId Service provider ID
340 PUBLIC S16 KwLiRguBndReq
342 Pst *post, /* post structure */
343 SuId suId, /* Service User Id */
344 SpId spId /* Service Provider Id */
347 PUBLIC S16 KwLiRguBndReq(post, suId, spId)
348 Pst *post; /* post structure */
349 SuId suId; /* Service User Id */
350 SpId spId; /* Service Provider Id */
355 /* jump to specific primitive depending on configured selector */
356 (*kwLiRguBndReqMt[post->selector])(post, suId, spId);
360 } /* end of KwLiRguBndReq */
367 * Handler for bind confirmation from MAC.
371 * This function handles the bind confirmation received
374 * @param[in] post - Post structure
375 * @param[in] suId - Service provider SAP ID
376 * @param[in] reason - Reason of confirmation
383 PUBLIC S16 KwLiRguUbndReq
390 PUBLIC S16 KwLiRguUbndReq(post, spId, reason)
398 /* jump to specific primitive depending on configured selector */
399 (*kwLiRguUbndReqMt[post->selector])(post, spId, reason);
403 } /* end of KwLiRguUbndReq */
410 * Handler for sending the PDU from RLC to MAC for common logical channels.
414 * This function sends a PDU of a common logical channel to MAC
415 * along with timing info for BCCH and PCCH and RNTI for CCCH.
417 * @param[in] post Post structure
418 * @param[in] spId Service Provider ID
419 * @param[in] datIndInfo Data Request Information
427 PUBLIC S16 KwLiRguCDatReq
431 RguCDatReqInfo *datReq
434 PUBLIC S16 KwLiRguCDatReq(post, spId, datReq)
437 RguCDatReqInfo *datReq;
441 // printf("CSHP: KwLiRguCDatReq ");
442 #ifdef RLC_MAC_DAT_REQ_RBUF
443 //printf("to RING \n");
444 post->event=EVTRGUCDATREQ;
445 if((kwLiRguDatReqRbuf(post, spId, datReq)) != ROK)
448 SPutStaticBuffer(post->region, post->pool,
449 (Data *) datReq, sizeof(RguCDatReqInfo), 0);
454 // printf("to Pack Sel is %d \n",post->selector);
455 /* jump to specific primitive depending on configured selector */
456 (*kwLiRguCDatReqMt[post->selector])(post, spId, datReq);
460 } /* end of KwLiRguCDatReq */
467 * Handler for sending PDU(s) from RLC to MAC for dedicated logical channels.
471 * This function sends PDU(s) to MAC via one or more dedicated
472 * logical channels along with the Buffer Occupancy of these
475 * @param[in] post Post structure
476 * @param[in] spId Service Provider ID
477 * @param[in] datIndInfo Data Request Information
485 PUBLIC S16 KwLiRguDDatReq
489 RguDDatReqInfo *datReq
492 PUBLIC S16 KwLiRguDDatReq(post, spId, datReq)
495 RguDDatReqInfo *datReq;
499 #ifdef RLC_MAC_DAT_REQ_RBUF
500 post->event=EVTRGUDDATREQ;
501 if((kwLiRguDatReqRbuf(post, spId, datReq)) != ROK)
504 SPutStaticBuffer(post->region, post->pool,
505 (Data *) datReq, sizeof(RguDDatReqInfo), 0);
509 /* jump to specific primitive depending on configured selector */
510 (*kwLiRguDDatReqMt[post->selector])(post, spId, datReq);
514 } /* end of KwLiRguDDatReq */
521 * Handler for reporting the Buffer Occupancy to MAC
522 * for common logical channels.
526 * This function reports the Buffer Occupancy of a common logical
527 * channel to MAC along with timing information for BCCH and PCCH
530 * @param[in] post Post structure
531 * @param[in] spId Service Provider ID
532 * @param[in] staRspInfo Status Response Information
540 PUBLIC S16 KwLiRguCStaRsp
544 RguCStaRspInfo *staRsp
547 PUBLIC S16 KwLiRguCStaRsp(post, spId, staRsp)
550 RguCStaRspInfo *staRsp;
555 /* jump to specific primitive depending on configured selector */
556 (*kwLiRguCStaRspMt[post->selector])(post, spId, staRsp);
559 } /* end of KwLiRguCStaRsp */
566 * Handler for reporting the Buffer Occupancy to MAC
567 * for dedicated logical channels.
571 * This function reports the Buffer Occupancy of one or more
572 * dedicated logical channels to MAC.
574 * @param[in] post Post structure
575 * @param[in] spId Service Provider ID
576 * @param[in] staRspInfo Status Response Information
584 PUBLIC S16 KwLiRguDStaRsp
588 RguDStaRspInfo *staRsp
591 PUBLIC S16 KwLiRguDStaRsp(post, spId, staRsp)
594 RguDStaRspInfo *staRsp;
598 #if defined(SPLIT_RLC_DL_TASK) && defined(RLC_MAC_STA_RSP_RBUF)
599 post->event= EVTRGUDSTARSP;
600 if((kwLiRguStaRspRbuf(post, spId, staRsp)) != ROK)
605 /* jump to specific primitive depending on configured selector */
606 (*kwLiRguDStaRspMt[post->selector])(post, spId, staRsp);
610 } /* end of KwLiRguDStaRsp */
613 /* kw005.201 added support for L2 Measurement */
621 * Handler for sending ulThrpMeasReqInfo from RLC to MAC for UL ip throughput measurement.
625 * This function sends ulThrpMeasReqInfo from RLC to MAC whenver UL ip throughput
626 * measurement is ON for a single or multiple qci in a UE. This is an indication for MAC
627 * to start the T2/T1 time stamps for the coresponding LCHs in the UE.
629 * @param[in] post Post structure
630 * @param[in] spId Service Provider ID
631 * @param[in] ulThrpMeasReqInfo Ul ip measurement request info
639 PUBLIC S16 KwLiRguL2MUlThrpMeasReq
643 RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq
646 PUBLIC S16 KwLiRguL2MUlThrpMeasReq(post, spId, l2mUlThrpMeasReq)
649 RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq;
652 TRC3(KwLiRguL2MUlThrpMeasReq)
654 /* jump to specific primitive depending on configured selector */
655 (*kwLiRguL2MUlThrpMeasReqMt[post->selector])(post, spId, l2mUlThrpMeasReq);
659 } /* end of KwLiRguL2MUlThrpMeasReq */
661 #endif /* LTE_RLC_R9 */
662 #endif /* LTE_L2_MEAS */
666 /****************************************************************************
668 ***************************************************************************/
674 * PtLiRguBndReq - portable bind request
676 * @param[in] post - Post structure
677 * @param[in] suId - Service user SAP ID
678 * @param[in] spId - Service provider ID
685 PUBLIC S16 PtLiRguBndReq
692 PUBLIC S16 PtLiRguBndReq(post, suId, spId)
698 #if (ERRCLASS & ERRCLS_DEBUG)
703 #if (ERRCLASS & ERRCLS_DEBUG)
704 tKwCb = KW_GET_KWCB(post->srcInst);
705 RLOG0(L_ERROR,"Improper selector value");
706 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
707 RLOG0(L_ERROR,"Improper selector value");
713 } /* end of PtLiRguBndReq() */
720 * PtLiRguUbndReq - portable bind request
722 * @param[in] post - Post structure
723 * @param[in] spId - Service user SAP ID
724 * @param[in] reason - Service provider ID
731 PUBLIC S16 PtLiRguUbndReq
738 PUBLIC S16 PtLiRguUbndReq(post, spId, reason)
744 #if (ERRCLASS & ERRCLS_DEBUG)
749 #if (ERRCLASS & ERRCLS_DEBUG)
750 tKwCb = KW_GET_KWCB(post->srcInst);
751 RLOG0(L_ERROR,"Improper selector value");
752 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
758 } /* end of PtLiRguUbndReq() */
765 * PtLiRguCDatReq - portable common channel data request
767 * @param[in] post - Post structure
768 * @param[in] spId - Service user SAP ID
769 * @param[in] datReq - Service provider ID
776 PUBLIC S16 PtLiRguCDatReq
780 RguCDatReqInfo *datReq
783 PUBLIC S16 PtLiRguCDatReq(post, spId, datReq)
786 RguCDatReqInfo *datReq;
789 #if (ERRCLASS & ERRCLS_DEBUG)
794 #if (ERRCLASS & ERRCLS_DEBUG)
795 tKwCb = KW_GET_KWCB(post->srcInst);
796 RLOG0(L_ERROR,"Improper selector value");
797 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
803 } /* end of PtLiRguCDatReq() */
810 * PtLiRguDDatReq - portable dedicated channel data request
812 * @param[in] post - Post structure
813 * @param[in] spId - Service user SAP ID
814 * @param[in] datReq - Service provider ID
821 PUBLIC S16 PtLiRguDDatReq
825 RguDDatReqInfo *datReq
828 PUBLIC S16 PtLiRguDDatReq( post, spId, datReq)
831 RguDDatReqInfo *datReq;
834 #if (ERRCLASS & ERRCLS_DEBUG)
839 #if (ERRCLASS & ERRCLS_DEBUG)
840 tKwCb = KW_GET_KWCB(post->srcInst);
841 RLOG0(L_ERROR,"Improper selector value");
842 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
848 } /* end of PtLiRguDDatReq() */
855 * PtLiRguCStaRsp - portable common channel Status Response
857 * @param[in] post - Post structure
858 * @param[in] spId - Service user SAP ID
859 * @param[in] staRsp - Service provider ID
866 PUBLIC S16 PtLiRguCStaRsp
870 RguCStaRspInfo *staRsp
873 PUBLIC S16 PtLiRguCStaRsp(post, spId, staRsp)
876 RguCStaRspInfo *staRsp;
879 #if (ERRCLASS & ERRCLS_DEBUG)
884 #if (ERRCLASS & ERRCLS_DEBUG)
885 tKwCb = KW_GET_KWCB(post->srcInst);
886 RLOG0(L_ERROR,"Improper selector value");
887 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
893 } /* end of PtLiRguCStaRsp() */
900 * PtLiRguDStaRsp - portable dedicated channel Status Response
902 * @param[in] post - Post structure
903 * @param[in] spId - Service user SAP ID
904 * @param[in] staRsp - Service provider ID
911 PUBLIC S16 PtLiRguDStaRsp
915 RguDStaRspInfo *staRsp
918 PUBLIC S16 PtLiRguDStaRsp(post, spId, staRsp)
921 RguDStaRspInfo *staRsp;
924 #if (ERRCLASS & ERRCLS_DEBUG)
929 #if (ERRCLASS & ERRCLS_DEBUG)
930 tKwCb = KW_GET_KWCB(post->srcInst);
931 RLOG0(L_ERROR,"Improper selector value");
932 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
938 } /* end of PtLiRguDStaRsp() */
940 /* kw005.201 added support for L2 Measurement */
948 * PtLiRguL2mUlThrpMeasReq - portable L2 Measurement Ul Thoughput Measurement Request
950 * @param[in] post - Post structure
951 * @param[in] spId - Service user SAP ID
952 * @param[in] l2mUlThrpMeasReq - Ul Throughput Measurement Request
959 PUBLIC S16 PtLiRguL2mUlThrpMeasReq
963 RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq
966 PUBLIC S16 PtLiRguL2mUlThrpMeasReq(post, spId, l2mUlThrpMeasReq)
970 RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq;
973 #if (ERRCLASS & ERRCLS_DEBUG)
977 TRC3(PtLiRguL2mUlThrpMeasReq)
978 #if (ERRCLASS & ERRCLS_DEBUG)
979 tKwCb = KW_GET_KWCB(post->srcInst);
980 RLOG0(L_ERROR,"Improper selector value");
981 #endif /* (ERRCLASS & ERRCLS_DEBUG) */
984 UNUSED(l2mUlThrpMeasReq);
987 } /* end of PtLiRguL2mUlThrpMeasReq() */
989 #endif /* LTE_RLC_R9 */
990 #endif /* LTE_L2_MEAS */
992 #ifdef MAC_RLC_UL_RBUF
993 PUBLIC S16 kwUlBatchProc ARGS ((Void));
994 EXTERN Void kwUtlFreeUlRBuf ARGS((void));
997 PUBLIC S16 kwUlBatchProc
1002 PUBLIC S16 kwUlBatchProc()
1006 /* Read from Ring Buffer and process PDCP packets */
1007 RguDDatIndInfo *datInd;
1008 Void *elmIndx = NULLP;
1009 PRIVATE Pst rlcUlRbfuPst={1,1,ENTKW,0,ENTRG,0,PRIOR0,RTESPEC,EVTRGUDDATIND,0,0,0,0};
1010 /* Read from Ring Buffer and process PDCP packets */
1013 RguDedDatInd1 *rguDatInd = NULLP;
1014 U8 rngBufDeqIndx = 0;
1016 elmIndx = SRngGetRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
1017 while(NULLP != elmIndx)
1019 rguDatInd = (RguDedDatInd1 *)elmIndx;
1020 datInd = (RguDDatIndInfo*) rguDatInd->msg;
1021 SsRngInfoTbl[SS_RNG_BUF_ULMAC_TO_ULRLC].nPktProc++;;//Number of pkt processed in tti
1024 KwLiRguDDatInd(&rlcUlRbfuPst, 0, datInd);
1028 RLOG0(L_ERROR,"Received NULL buffer");
1030 rguDatInd->msg=NULLP;
1031 SRngIncrRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
1037 //if(rngBufDeqIndx >= SS_RNG_MAX_ULMAC_TO_ULRLC_DQ_CNT)
1040 if((elmIndx = SRngGetRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC)) == NULLP)
1044 elmIndx = SRngGetRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
1045 while(NULLP != elmIndx)
1047 datInd = (RguDDatIndInfo *)elmIndx;
1048 KwLiRguDDatInd(&rlcUlRbfuPst, 0, datInd);
1052 SRngIncrRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC);
1054 if((elmIndx = SRngGetRIndx(SS_RNG_BUF_ULMAC_TO_ULRLC)) == NULLP)
1065 * Handler to clear Ring buffer from UL RLC
1068 * This function clears all the ring buffer content from UL RLC
1076 PUBLIC Void kwUtlFreeUlRBuf(void)
1078 PUBLIC Void kwUtlFreeUlRBuf()
1081 RguDDatIndInfo *datInd;
1086 TRC2(kwUtlFreeUlRBuf)
1087 /* Free SS_RNG_BUF_ULMAC_TO_ULRLC */
1088 while((SDeqSRngBuf (SS_RNG_BUF_ULMAC_TO_ULRLC, &elem) == ROK))
1090 datInd = (RguDDatIndInfo *)elem;
1091 for(numLch = 0; numLch< datInd->numLch; numLch++)
1093 for(numPdu = 0; numPdu < datInd->lchData[numLch].pdu.numPdu; numPdu++)
1095 if(datInd->lchData[numLch].pdu.mBuf[numPdu])
1097 KW_FREE_BUF_WC(datInd->lchData[numLch].pdu.mBuf[numPdu]);
1101 KW_PST_FREE(0, 0, datInd, sizeof(RguDDatIndInfo));
1105 #ifdef RLC_MAC_STA_RSP_RBUF
1107 PUBLIC S16 kwLiRguStaRspRbuf
1114 PUBLIC S16 kwLiRguStaRspRbuf(post, spId, staRsp)
1124 RguDStaRspInfo *staRspInfo = NULL;
1125 elem = SRngGetWIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
1128 staRspInfo = (RguDStaRspInfo *)elem;
1129 cmMemcpy((U8 *)staRspInfo, (U8 *)staRsp, sizeof(RguDStaRspInfo));
1130 staRspInfo->post = *post;
1131 SRngIncrWIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
1132 SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].pktRate++;
1136 RLOG0(L_ERROR,"RLC DL STA RSP RBUF is FULL!!! ");
1137 SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].pktDrop++;
1141 } /* cmPkKwuDatReq */
1144 #ifdef RLC_MAC_DAT_REQ_RBUF
1146 PUBLIC S16 kwLiRguDatReqRbuf
1153 PUBLIC S16 kwLiRguDatReqRbuf(post, spId, datReq)
1162 RguInfoRingElem *datReqRing=NULLP;
1163 elem = SRngGetWIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
1166 datReqRing = (RguInfoRingElem *) elem;
1167 datReqRing->spId = spId;
1168 datReqRing->event = post->event;
1169 datReqRing->msg =datReq;
1170 SRngIncrWIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
1171 SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].pktRate++;
1175 printf("RLC DL DAT REQ RBUF is FULL!!! \n");
1176 SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].pktDrop++;
1180 } /* cmPkKwuDatReq */
1186 #endif /* __cplusplus */
1188 /********************************************************************30**
1190 **********************************************************************/