-#ifdef RLC_MAC_DAT_REQ_RBUF
-S16 rgDlDatReqBatchProc
-(
-Void
-)
-{
-/* Read from Ring Buffer and process PDCP packets */
-
- uint8_t rngBufDeqIndx = 0;
- static Pst rgDDatRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUDDATREQ,0,0,2,0};
- static Pst rgCDatRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUCDATREQ,0,0,2,0};
- Void *elmIndx = NULLP;
- RguInfoRingElem *datReqRing=NULLP;
- elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
- while(NULLP != elmIndx)
- {
- datReqRing= (RguInfoRingElem *)elmIndx;
- SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].nPktProc++;//Number of pkt processed in tti
- if(datReqRing->msg)
- {
- if(datReqRing->event == EVTRGUDDATREQ)
- {
- RgUiRguDDatReq(&rgDDatRbfuPst, datReqRing->spId, (RguDDatReqInfo *) datReqRing->msg);
- }
- else
- {
- // printf("CSHP:*** Received CDatReq in MAC Ring \n");
- RgUiRguCDatReq(&rgCDatRbfuPst, datReqRing->spId, (RguCDatReqInfo *) datReqRing->msg);
- }
- }
- else
- {
- printf(" Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->read,
- SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->write);
- /* Due to the cache issue we are verifying the mbuf pointer again and sending it to rlc if avilable*/
- if(datReqRing->msg)
- {
- if(datReqRing->event == EVTRGUDDATREQ)
- RgUiRguDDatReq(&rgDDatRbfuPst, datReqRing->spId, (RguDDatReqInfo *) datReqRing->msg);
- else
- RgUiRguCDatReq(&rgCDatRbfuPst, datReqRing->spId, (RguCDatReqInfo *) datReqRing->msg);
- }else
- {
- printf(" still Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->read,
- SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ].r_addr->write);
- }
- }
- datReqRing->msg=NULLP;
- SRngIncrRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ);
- datReqRing->event=0;
- elmIndx = NULLP;
- datReqRing= NULLP;
- rngBufDeqIndx++;
-
- if(rngBufDeqIndx >= SS_RNG_MAX_DLRLC_TO_DLMAC_DAT_REQ_DQ_CNT)
- break;
-
- if((elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC_DAT_REQ)) == NULLP)
- break;
- }
-
- return ROK;
-}
-#endif
-
-#ifdef RLC_MAC_STA_RSP_RBUF
-S16 rgDlStaRspBatchProc(Void)
-{
-/* Read from Ring Buffer and process PDCP packets */
-
- uint8_t rngBufDeqIndx = 0;
- static Pst rgDStaRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUDSTARSP,0,0,2,0};
- static Pst rgCStaRbfuPst ={1,1,ENTMAC,0,ENTRLC,1,PRIOR0,RTESPEC,EVTRGUCSTARSP,0,0,2,0};
- Void *elmIndx = NULLP;
- RguInfoRingElem *staRspRing=NULLP;
-
- elmIndx = SRngGetRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
- while(NULLP != elmIndx)
- {
- staRspRing= (RguInfoRingElem *)elmIndx;
- SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].nPktProc++;//Number of pkt processed in tti
-
- if(staRspRing->msg!= NULLP)
- {
- if( staRspRing->event == EVTRGUDSTARSP)
- {
- RgUiRguDStaRsp(&rgDStaRbfuPst, staRspRing->spId, (RguDStaRspInfo *) staRspRing->msg);
- }
- else
- {
- RgUiRguCStaRsp(&rgCStaRbfuPst, staRspRing->spId, (RguCStaRspInfo *) staRspRing->msg);
- }
- }
- else
- {
- printf(" Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->read,
- SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->write);
- /* Due to the cache issue we are verifying the mbuf pointer again and sending it to rlc if avilable*/
- if(staRspRing->msg!= NULLP)
- {
- if( staRspRing->event == EVTRGUDSTARSP)
- RgUiRguDStaRsp(&rgDStaRbfuPst, staRspRing->spId, (RguDStaRspInfo *) staRspRing->msg);
- else
- RgUiRguCStaRsp(&rgCStaRbfuPst, staRspRing->spId, (RguCStaRspInfo *) staRspRing->msg);
- }else
- {
- printf(" still Buf Pinter is NULL RBUF Read(%ld) write (%ld) \n",SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->read,
- SsRngInfoTbl[SS_RNG_BUF_DLRLC_TO_DLMAC].r_addr->write);
- }
- }
- staRspRing->msg=NULLP;
- SRngIncrRIndx(SS_RNG_BUF_DLRLC_TO_DLMAC);
- staRspRing->event =0;
- elmIndx = NULLP;
- staRspRing= NULLP;
-
- rngBufDeqIndx++;