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 /************************************************************************
25 Desc: C source code for Entry point fucntions
29 **********************************************************************/
31 /** @file rg_sch_uhm.c
32 @brief This module handles uplink harq related functionality in MAC.
35 /* header include files -- defines (.h) */
36 #include "common_def.h"
37 #include "rg_env.h" /* MAC Environment Defines */
38 #include "tfu.h" /* TFU Interface defines */
39 #include "rgr.h" /* RGR Interface defines */
40 #include "lrg.h" /* LRG Interface defines */
42 #include "rg_sch.h" /* Scheduler defines */
43 #include "rg_sch_inf.h" /* Scheduler defines */
44 #include "rg_sch_err.h" /* MAC error defines */
46 /* header/extern include files (.x) */
48 #include "tfu.x" /* TFU Interface defines */
49 #include "rgr.x" /* RGR Interface includes */
50 #include "lrg.x" /* LRG Interface includes */
52 #include "rg_sch_inf.x" /* Scheduler defines */
53 #include "rg_sch.x" /* Scheduler includes */
54 #include "rg_sch_cmn.h"
55 #include "rg_sch_cmn.x"
63 /* forward references */
66 uint32_t gUlRetxPassCntr = 0;
67 /*EXTERN uint32_t gUlRetxFailCntr;
68 EXTERN uint32_t gUlCrcPassCounter;
69 EXTERN uint32_t gUlCrcFailCounter;*/
71 uint8_t rgRvIdxTable[] = {0, 3, 1, 2}; /* This gives rvIdx for a given rv */
72 uint8_t rgRvTable[] = {0, 2, 3 ,1}; /* This gives rv for a given rvIdx */
75 Void rgSCHCmnEmtcHdlHarqProcFail
79 RgSchUlHqProcCb *hqProc,
82 Void rgSCHEmtcInitUlUeHqEnt
92 * @brief Handler for HARQ processing on recieving Data indication from PHY.
96 * Function: rgSCHUhmProcDatInd
98 * Invoked by: rgSCHTomTfuDatInd of TOM
101 * - Set rcvdCrcInd variable to TRUE
108 #ifndef MAC_SCH_STATS
110 Void rgSCHUhmProcDatInd
117 Void rgSCHUhmProcDatInd(cell, ue, frm)
122 #else /* MAC_SCH_STATS */
124 Void rgSCHUhmProcDatInd
132 Void rgSCHUhmProcDatInd(cell, ue, frm, cqi)
138 #endif /* MAC_SCH_STATS */
140 RgSchUlHqProcCb *hqProc;
142 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
144 uint8_t maxiTbs = rgSchCmnUlCqiToTbsTbl[cell->isCpUlExtend]
148 rgSCHUtlUlHqProcForUe(cell, frm, ue, &hqProc);
151 printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
152 ue->ueId, frm.sfn, frm.slot);
155 hqProc->rcvdCrcInd = TRUE;
159 ueUl->ulLaCb.deltaiTbs += UL_LA_STEPUP;
160 iTbs = (ueUl->ulLaCb.cqiBasediTbs + ueUl->ulLaCb.deltaiTbs)/100;
164 ueUl->ulLaCb.deltaiTbs = (maxiTbs * 100) - ueUl->ulLaCb.cqiBasediTbs;
170 /** Stats update over here
173 hqFailStats.ulCqiStat[cqi - 1].numOfAcks++;
178 /* UL stats are filled in primary index as of now */
179 cell->tenbStats->sch.ulAckNack[rgRvTable[hqProc->rvIdx]]++;
180 ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(cell)].ulAckNackCnt++;
183 ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(cell)].ulTpt += (hqProc->alloc->grnt.datSz << 3);
184 cell->tenbStats->sch.ulTtlTpt +=(hqProc->alloc->grnt.datSz << 3);//pverma
189 } /* rgSCHUhmProcDatInd */
192 * @brief Handler for HARQ processing on recieving Data indication from PHY.
196 * Function: rgSCHUhmProcMsg3DatInd
198 * Invoked by: rgSCHTomTfuDatInd of TOM
201 * - Set rcvdCrcInd variable to TRUE
203 * @param[in,out] *hqProc
207 Void rgSCHUhmProcMsg3DatInd
209 RgSchUlHqProcCb *hqProc
212 Void rgSCHUhmProcMsg3DatInd(hqProc)
213 RgSchUlHqProcCb *hqProc;
216 hqProc->rcvdCrcInd = TRUE;
217 hqProc->remTx = 0; /*Reseting the value of rem Tx*/
218 printf("\nrgSCHUhmProcMsg3DatInd,id:%u\n",hqProc->procId);
220 } /* rgSCHUhmProcMsg3DatInd */
223 * @brief Handler for HARQ processing on recieving Data indication from PHY.
227 * Function: rgSCHUhmProcMsg3Failure
229 * Invoked by: rgSCHTomTfuDatInd of TOM
232 * - Set rcvdCrcInd variable to TRUE
234 * @param[in,out] *hqProc
238 Void rgSCHUhmProcMsg3Failure
240 RgSchUlHqProcCb *hqProc
243 Void rgSCHUhmProcMsg3Failure(hqProc)
244 RgSchUlHqProcCb *hqProc;
248 RG_SCH_EMTC_IS_CRCIND_RCVD_CHK_RACB(hqProc);
250 if(hqProc->rcvdCrcInd != TRUE)
252 hqProc->rcvdCrcInd = FALSE;
256 } /* rgSCHUhmProcMsg3Failure */
259 * @brief Handler for HARQ processing on recieving Decode failure from PHY.
263 * Function: rgSCHUhmProcHqFailure
265 * Invoked by: rgSCHTomTfuDecFailInd of TOM
268 * - Update NACK information in harq info.
269 * - Update RV index of received RV from PHY in harq info.
270 * - Set PhichInfo in DlSf
278 #ifndef MAC_SCH_STATS
280 Void rgSCHUhmProcHqFailure
288 Void rgSCHUhmProcHqFailure(cell, ue, frm, rv)
294 #else /* MAC_SCH_STATS */
296 Void rgSCHUhmProcHqFailure
305 Void rgSCHUhmProcHqFailure(cell, ue, frm, rv, cqi)
312 #endif /* MAC_SCH_STATS */
314 RgSchUlHqProcCb *hqProc;
316 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue,cell);
320 rgSCHUtlUlHqProcForUe(cell, frm, ue, &hqProc);
323 printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
324 ue->ueId, frm.sfn, frm.slot);
329 ueUl->ulLaCb.deltaiTbs -= UL_LA_STEPDOWN;
330 iTbs = (ueUl->ulLaCb.cqiBasediTbs + ueUl->ulLaCb.deltaiTbs)/100;
334 ueUl->ulLaCb.deltaiTbs = -(ueUl->ulLaCb.cqiBasediTbs);
340 /** Stats update over here */
342 static uint32_t retxCnt = 0;
344 hqFailStats.ulCqiStat[cqi - 1].numOfNacks++;
346 #endif /* MAC_SCH_STATS */
347 if(hqProc->rcvdCrcInd != TRUE)
349 hqProc->rcvdCrcInd = FALSE;
352 /* UL stats are filled in primary index as of now */
353 cell->tenbStats->sch.ulAckNack[rgRvTable[hqProc->rvIdx]]++;
354 ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(cell)].ulAckNackCnt++;
355 cell->tenbStats->sch.ulNack[rgRvTable[hqProc->rvIdx]]++;
356 ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(cell)].ulNackCnt++;
358 hqProc->rvIdxPhy.pres = rv.pres;
361 hqProc->rvIdxPhy.val = rgRvIdxTable[rv.val];
364 } /* rgSCHUhmProcHqFailure */
367 * @brief Handler for identifying the HARQ process cb associated with the
372 * Function: rgSCHUhmGetUlHqProc
375 * - Return pointer to uplink harq process corresponding to the timing
376 * information passed.
380 * @return RgSchUlHqProcCb*
381 * -# Pointer to harq process corresponding to index
385 RgSchUlHqProcCb* rgSCHUhmGetUlHqProc
392 RgSchUlHqProcCb* rgSCHUhmGetUlHqProc(cell, ue, idx)
398 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
400 #if (ERRCLASS & ERRCLS_DEBUG)
401 if(idx >= ueUl->hqEnt.numHqPrcs)
406 return (&(ueUl->hqEnt.hqProcCb[idx]));
407 } /* rgSCHUhmGetUlHqProc */
410 * @brief Handler for HARQ processing on recieving new trasmission indication
415 * Function: rgSCHUhmNewTx
420 * - Update harq info with values indicating new HARQ transmission.
422 * @param[in,out] *hqProc
429 RgSchUlHqProcCb *hqProc,
434 Void rgSCHUhmNewTx(hqProc, maxHqRetx, alloc)
435 RgSchUlHqProcCb *hqProc;
442 hqProc->alloc = alloc;
443 hqProc->remTx = maxHqRetx;
444 hqProc->rcvdCrcInd = FALSE;
446 hqProc->rvIdxPhy.pres = FALSE;
448 if (hqProc->alloc->ue)
450 ((RgUeUlHqCb*)hqProc->hqEnt)->numBusyHqProcs++;
454 } /* rgSCHUhmNewTx */
457 * @brief Free an uplink HARQ process.
461 * Function: rgSCHUhmFreeProc
466 * - Set alloc pointer to NULLP
468 * @param[in] RgSchUlHqProcCb *hqProc
469 * @param[in] RgSchCellCb *cell
473 Void rgSCHUhmFreeProc
475 RgSchUlHqProcCb *hqProc,
479 Void rgSCHUhmFreeProc(hqProc, cell)
480 RgSchUlHqProcCb *hqProc;
490 if (hqProc->alloc && hqProc->alloc->ue)
492 ueCb = hqProc->alloc->ue;
495 uint32_t nonLcg0ReportedBs = ((RgSchCmnLcg *)(ueCb->ul.lcgArr[1].sch))->reportedBs + \
496 ((RgSchCmnLcg *)(ueCb->ul.lcgArr[2].sch))->reportedBs + \
497 ((RgSchCmnLcg *)(ueCb->ul.lcgArr[3].sch))->reportedBs;
498 ((RgUeUlHqCb*)hqProc->hqEnt)->numBusyHqProcs--;
499 if (! ((RgUeUlHqCb*)hqProc->hqEnt)->numBusyHqProcs && !(nonLcg0ReportedBs))
501 while (ueCb->ulActiveLCs)
503 if (ueCb->ulActiveLCs & 0x1)
505 cell->qciArray[qci].ulUeCount--;
508 ueCb->ulActiveLCs >>= 1;
516 if(hqProc && (RgUeUlHqCb*)hqProc->hqEnt)
520 printf("\n\n########HARQ FREED HARQPROC ID (%d )after rgSCHUhmFreeProc inuse %ld free %ld \n",hqProc->alloc->grnt.hqProcId, (CmLListCp *)(&((RgUeUlHqCb*)hqProc->hqEnt)->inUse)->count,(CmLListCp *) (&((RgUeUlHqCb*)hqProc->hqEnt)->free)->count);
522 hqProc->alloc = NULLP;
523 hqProc->ulSfIdx = RGSCH_INVALID_INFO;
524 /*ccpu00116293 - Correcting relation between UL slot and DL slot based on RG_UL_DELTA*/
525 hqProc->isRetx = FALSE;
526 hqProc->remTx = 0; /*Reseting the remTx value to 0*/
528 RG_SCH_EMTC_SET_ISDTX_TO_FALSE(hqProc);
530 cmLListDelFrm(&((RgUeUlHqCb*)hqProc->hqEnt)->inUse,&hqProc->lnk);
531 cmLListAdd2Tail(&((RgUeUlHqCb*)hqProc->hqEnt)->free, &hqProc->lnk);
534 printf("after rgSCHUhmFreeProc inuse %ld free %ld \n",
535 (CmLListCp *)(&((RgUeUlHqCb*)hqProc->hqEnt)->inUse)->count,
536 (CmLListCp *) (&((RgUeUlHqCb*)hqProc->hqEnt)->free)->count);
541 printf("\nhqEnt is NULL\n");
544 } /* rgSCHUhmFreeProc */
547 * @brief Handler for HARQ processing on recieving re-trasmission
548 * indication from USM.
552 * Function: rgSCHUhmRetx
557 * - Update harq info with values corresponding to
560 * @param[in,out] *hqProc
566 RgSchUlHqProcCb *hqProc,
570 Void rgSCHUhmRetx(hqProc, alloc)
571 RgSchUlHqProcCb *hqProc;
576 hqProc->alloc = alloc;
578 hqProc->rvIdx = (hqProc->rvIdx + 1) % 4;
579 hqProc->rvIdxPhy.pres = FALSE;
585 * @brief Handler for initializing the HARQ entity.
589 * Function: rgSCHUhmRgrUeCfg
594 * - Initialize maxHqRetx
597 * @param[in,out] *ueCb
603 Void rgSCHUhmRgrUeCfg
610 Void rgSCHUhmRgrUeCfg(cellCb, ueCb, ueCfg)
617 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ueCb, cellCb);
619 ueUl->hqEnt.maxHqRetx = ((ueCfg->ueUlHqCfg.maxUlHqTx) - 1);
621 /* Storing the delta HARQ offset for HARQ + PUSCH */
622 ueCb->ul.betaHqOffst = ueCfg->puschDedCfg.bACKIdx;
624 cmLListInit(&ueUl->hqEnt.free);
625 cmLListInit(&ueUl->hqEnt.inUse);
626 for(i=0; i < ueUl->hqEnt.numHqPrcs; i++)
628 ueUl->hqEnt.hqProcCb[i].hqEnt = (void*)(&ueUl->hqEnt);
629 ueUl->hqEnt.hqProcCb[i].procId = i;
630 ueUl->hqEnt.hqProcCb[i].remTx = 0;
631 ueUl->hqEnt.hqProcCb[i].ulSfIdx = RGSCH_INVALID_INFO;
632 ueUl->hqEnt.hqProcCb[i].alloc = NULLP;
634 /* ccpu00139513- Initializing SPS flags*/
635 ueUl->hqEnt.hqProcCb[i].isSpsActvnHqP = FALSE;
636 ueUl->hqEnt.hqProcCb[i].isSpsOccnHqP = FALSE;
638 cmLListAdd2Tail(&ueUl->hqEnt.free, &ueUl->hqEnt.hqProcCb[i].lnk);
639 ueUl->hqEnt.hqProcCb[i].lnk.node = (PTR)&ueUl->hqEnt.hqProcCb[i];
643 rgSCHEmtcInitUlUeHqEnt(cellCb, ueCfg, ueCb);
646 } /* rgSCHUhmRgrUeCfg */
649 * @brief Handler for re-initializing the HARQ entity.
653 * Function: rgSCHUhmRgrUeRecfg
658 * - Re-initialize maxHqRetx
661 * @param[in,out] *ueCb
667 Void rgSCHUhmRgrUeRecfg
674 Void rgSCHUhmRgrUeRecfg(cellCb, ueCb, ueRecfg)
680 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ueCb, cellCb);
682 /* [ccpu00123958]-ADD- Check for HARQ Reconfig from the bit mask */
683 if(RGR_UE_ULHARQ_RECFG & ueRecfg->ueRecfgTypes)
685 ueUl->hqEnt.maxHqRetx = (ueRecfg->ueUlHqRecfg.maxUlHqTx - 1);
689 } /* rgSCHUhmRgrUeRecfg */
692 * @brief Handler for de-initializing the HARQ entity.
696 * Function: rgSCHUhmFreeUe
703 * @param[in,out] *ueCb
713 Void rgSCHUhmFreeUe(cellCb, hqEnt)
719 /* ccpu00117052 - MOD - Passing double pointer
720 for proper NULLP assignment*/
721 rgSCHUtlFreeSBuf(cellCb->instIdx,
722 (Data **)(&(hqEnt->hqProcCb)),
723 hqEnt->numHqPrcs * sizeof(RgSchUlHqProcCb));
727 } /* rgSCHUhmFreeUe */
731 * @brief Handler for appending the PHICH information in to the dlSf.
735 * Function: rgSCHUhmAppendPhich
740 * - Set PhichInfo in DlSf for each Hq
742 * @param[in] *RgSchCellCb
743 * @param[in] CmLteTimingInfo
748 S16 rgSCHUhmAppendPhich
755 S16 rgSCHUhmAppendPhich (cellCb, frm, idx)
766 RgSchUlAlloc *ulAlloc;
768 Bool allwNack = TRUE;
769 #endif /* LTEMAC_HDFDD */
770 RgSchCmnUlCell *cellUl = RG_SCH_CMN_GET_UL_CELL(cellCb);
775 if(cellUl->hqFdbkIdx[idx] != RGSCH_INVALID_INFO)
777 ulAlloc = rgSCHUtlFirstHqFdbkAlloc (cellCb, idx);
780 /*ccpu00106104 MOD added check for ACKNACK rep*/
781 /*added check for acknack so that adaptive retx considers ue
782 inactivity due to ack nack repetition*/
783 if((ulAlloc->ue != NULLP) && ((TRUE != ulAlloc->forMsg3) &&
784 ((ulAlloc->ue->measGapCb.isMeasuring == TRUE) ||
785 (ulAlloc->ue->ackNakRepCb.isAckNakRep == TRUE))))
787 /* Mark the UE for retransmission */
788 /* If UE is measuring then we should not be sending PHICH unless msg3 */
789 /*UE assumes ack, if nack then do adaptive re-transmission*/
790 /*ulAlloc->hqProc->rcvdCrcInd = FALSE;--*/
791 ulAlloc = rgSCHUtlNextHqFdbkAlloc (cellCb, ulAlloc, idx);
795 if (rgSCHUtlGetPhichInfo (ulAlloc->hqProc, &rbStart, &nDmrs, &iPhich) != ROK)
797 if (rgSCHUtlGetPhichInfo (ulAlloc->hqProc, &rbStart, &nDmrs) != ROK)
802 if(nDmrs != RGSCH_INVALID_NDMRS)
804 if(cellCb->dynCfiCb.switchOvrInProgress)
806 ulAlloc->hqProc->rcvdCrcInd = TRUE;
809 if(ulAlloc->hqProc->rcvdCrcInd)
812 rgSCHUtlAddPhich (cellCb, frm, TRUE, nDmrs, rbStart, iPhich);
814 rgSCHUtlAddPhich (cellCb, frm, TRUE, nDmrs, rbStart, ulAlloc->forMsg3);
817 /* Sending NACK in PHICH for failed UL TX */
821 rgSCHUtlAddPhich (cellCb, frm, FALSE, nDmrs, rbStart, iPhich);
824 if (ulAlloc->ue != NULLP && ulAlloc->ue->hdFddEnbld)
826 rgSCHCmnHdFddChkNackAllow( cellCb, ulAlloc->ue, frm, &allwNack);
827 /* Present implementaion of non-HDFDD does not send phich req
828 incase of NACK. So commented this part to maintain same right
833 rgSCHUtlAddPhich (cellCb, frm, FALSE, nDmrs, rbStart, ulAlloc->forMsg3);
837 rgSCHUtlAddPhich (cellCb, frm, TRUE, nDmrs, rbStart, ulAlloc->forMsg3);
842 rgSCHUtlAddPhich (cellCb, frm, FALSE, nDmrs, rbStart, ulAlloc->forMsg3);
845 rgSCHUtlAddPhich (cellCb, frm, FALSE, nDmrs, rbStart, ulAlloc->forMsg3);
846 #endif/* LTEMAC_HDFDD */
850 ulAlloc = rgSCHUtlNextHqFdbkAlloc (cellCb, ulAlloc, idx);
854 } /* rgSCHUhmAppendPhich */
857 * @brief This function initializes the DL HARQ Entity of UE.
861 * Function: rgSCHUhmHqEntInit
862 * Purpose: This function initializes the UL HARQ Processes of
863 * UE control block. This is performed at the time
864 * of creating UE control block.
866 * Invoked by: configuration module
868 * @param[in] RgSchUeCb* ueCb
875 S16 rgSCHUhmHqEntInit
881 S16 rgSCHUhmHqEntInit(cellCb, ueCb)
886 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ueCb, cellCb);
888 Inst inst = ueCb->cell->instIdx;
892 /* Init the HARQ processes */
893 ueUl->hqEnt.numHqPrcs = RGSCH_NUM_UL_HQ_PROC;
895 /* Init the HARQ processes */
896 ueUl->hqEnt.numHqPrcs =
897 rgSchTddUlNumHarqProcTbl[ueCb->cell->ulDlCfgIdx];
898 if (rgSCHUtlAllocSBuf(inst, (Data **)&ueUl->hqEnt.hqProcCb,
899 ueUl->hqEnt.numHqPrcs * \
900 sizeof(RgSchUlHqProcCb)) != ROK)
907 } /* rgSCHUhmHqEntInit */
911 * @brief This function gets an available HARQ process.
915 * Function: rgSCHUhmGetAvlHqProc
916 * Purpose: This function returns an available HARQ process in
917 * the UL direction. All HARQ processes are maintained
918 * in queues of free and inuse.
920 * 1. Check if the free queue is empty. If yes, return
922 * 2. If not empty, update the proc variable with the
923 * first process in the queue. Return ROK.
925 * Invoked by: scheduler
927 * @param[in] RgSchUeCb *ue
928 * @param[in] CmLteTimingInfo timingInfo
929 * @param[out] RgSchDlHqProc **hqP
931 * -#ROK if successful
932 * -#RFAILED otherwise
936 S16 rgSCHUhmGetAvlHqProc
940 RgSchUlHqProcCb **hqP
943 S16 rgSCHUhmGetAvlHqProc (cell, ue, hqP)
946 RgSchUlHqProcCb **hqP;
949 RgSchCmnUlCell *cellUl = RG_SCH_CMN_GET_UL_CELL(cell);
950 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
951 RgSchUlHqProcCb *tmpHqProc;
957 CM_LLIST_FIRST_NODE(&(hqE->free), tmp);
961 //RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId,
962 // "rgSCHUhmGetAvlHqProc free %ld inUse %ld ue %d"
963 // , hqE->free.count, hqE->inUse.count, ue->ueId);
964 //printf("5GTF_ERROR rgSCHUhmGetAvlHqProc cellId %d %ld inUse %ld ue %d"
965 //, cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId);
966 /* No Harq Process available in the free queue. */
970 tmpHqProc = (RgSchUlHqProcCb *)(tmp->node);
972 /* Remove the element from the free Queue */
973 cmLListDelFrm(&hqE->free, tmp);
975 /* Add the element into the inUse Queue as well */
976 cmLListAdd2Tail(&hqE->inUse, &tmpHqProc->lnk);
979 printf("rgSCHUhmGetAvlHqProc cellId %d free %ld inUse %ld ue %d time (%d %d)\n",cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId,cellUl->schdTime.sfn,cellUl->schdTime.slot);
981 tmpHqProc->schdTime = cellUl->schdTime;
986 } /* rgSCHUhmGetAvlHqProc */
989 * @brief Handler for identifying the HARQ process cb associated with the
994 * Function: rgSCHUhmGetUlProcByTime
997 * - Return pointer to uplink harq process corresponding to the timing
998 * information passed.
1002 * @return RgSchUlHqProcCb*
1003 * -# Pointer to harq process corresponding to index
1007 RgSchUlHqProcCb* rgSCHUhmGetUlProcByTime
1014 RgSchUlHqProcCb* rgSCHUhmGetUlProcByTime(cell, ue, frm)
1017 CmLteTimingInfo frm;
1020 RgSchCmnUlUe *ueUl = RG_SCH_CMN_GET_UL_UE(ue, cell);
1021 CmLListCp *lst = &ueUl->hqEnt.inUse;
1022 CmLList *lnk = lst->first;
1023 RgSchUlHqProcCb *proc;
1027 proc = (RgSchUlHqProcCb *)(lnk->node);
1029 // printf("compare rgSCHUhmGetUlProcByTime time (%d %d) CRC time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot,frm.sfn,frm.slot ,proc->procId);
1030 if (RGSCH_TIMEINFO_SAME(proc->schdTime, frm))
1032 // printf("Harq timing Matched rgSCHUhmGetUlProcByTime time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot, proc->procId);
1038 } /* rgSCHUhmGetUlProcByTime */
1042 /**********************************************************************
1045 **********************************************************************/