static int RLOG_FILE_ID=279;
static int RLOG_MODULE_ID=4096;
/* header include files -- defines (.h) */
-#include "envopt.h" /* environment options */
-#include "envdep.h" /* environment dependent */
-#include "envind.h" /* environment independent */
-#include "gen.h" /* general layer */
-#include "ssi.h" /* system service interface */
+#include "common_def.h"
#ifdef L2_OPTMZ
#include "ss_strm.h"
#endif
-#include "cm5.h" /* common timers */
-#include "cm_hash.h" /* common hash list */
-#include "cm_mblk.h" /* common memory link list library */
-#include "cm_llist.h" /* common linked list library */
-#include "cm_err.h" /* common error */
-#include "cm_lte.h" /* common LTE */
#include "lrg.h"
#include "crg.h"
-#include "rgu.h"
#include "tfu.h"
+#include "rgu.h"
#include "rg_sch_inf.h"
#include "rg_env.h"
#include "rg_err.h"
#include "rg.h"
+#include "du_app_mac_inf.h"
/* header/extern include files (.x) */
-#include "gen.x" /* general layer */
-#include "ssi.x" /* system service interface */
#ifdef L2_OPTMZ
#include "ss_strm.x"
#endif
-#include "cm5.x" /* common timers */
-#include "cm_lib.x" /* common library */
-#include "cm_hash.x" /* common hash list */
-#include "cm_llist.x" /* common linked list library */
-#include "cm_mblk.x" /* memory management */
-#include "cm_tkns.x" /* common tokens */
-#include "cm_lte.x" /* common LTE */
#include "lrg.x"
#include "crg.x"
-#include "rgu.x"
#include "tfu.x"
+#include "rgu.x"
#include "rg_sch_inf.x"
#include "rg_prg.x" /* PRG interface typedefs */
-#include "mac_interface.h"
#include "rg.x"
#ifdef L2_OPTMZ
rgFreeSBuf(inst,(Data **)&(hqE->procs[idx1]), sizeof(RgDlHqProcCb));
}
RLOG0(L_ERROR, "Memory Alloc Failure for RgDlHqProcCb");
- RETVALUE(RFAILED);
+ return RFAILED;
}
hqE->procs[idx1]->procId = idx1;
}
- RETVALUE(ROK);
+ return ROK;
} /* rgDHMHqEntInit */
/**
if((tbIndex > RG_MAX_TB_PER_UE) ||
(tbIndex == 0))
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
hqP->tbInfo[tbIndex-1].numSchLch = 0;
hqP->tbInfo[tbIndex-1].contResCe = NOTPRSNT;
hqP->tbInfo[tbIndex-1].contResId = NULLP;
- RETVALUE(ROK);
+ return ROK;
} /* rgDHMRlsHqProc */
/**
/* Pick the proc based on the index provided */
*hqP = (ue->dl.hqEnt.procs[idx]);
- RETVALUE(ROK);
+ return ROK;
} /* rgDHMGetHqProcFrmId */
/*PRIVATE U32 dataAvl; */
"macCell(sfn sf): (%d %d) tbTimingInfo(sfn sf): (%d %d)\n"
"dlSf %p dlSf->tbs.count %d hqp %p tb %p\n",
hqP->tbInfo[i].pdcch.rnti,
- dlSf->schdTime.sfn, dlSf->schdTime.subframe,
- cellCb->crntTime.sfn, cellCb->crntTime.subframe,
+ dlSf->schdTime.sfn, dlSf->schdTime.slot,
+ cellCb->crntTime.sfn, cellCb->crntTime.slot,
hqP->tbInfo[i].timingInfo.sfn,
- hqP->tbInfo[i].timingInfo.subframe,
+ hqP->tbInfo[i].timingInfo.slot,
(Void *)dlSf, dlSf->tbs.count,
(Void *)hqP,
(Void *)hqP->tbInfo[i].tb);*/
/* Mukesh :: in case of rpepetiton this is not rerd*/
- if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf)
+ if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf)
{
/* Check if data from RLC had been received and got muxed. */
#ifndef L2_OPTMZ
/* Data not received but ta needs to be sent. */
/* MUX TA and send it */
bldPdu.datReq = NULLP;
- bldPdu.reqType = EVTTFUTTIIND;
+ //bldPdu.reqType = EVENT_SLOT_IND_TO_MAC;
bldPdu.schdTbSz = hqP->tbInfo[i].tbSz;
bldPdu.ta = hqP->tbInfo[i].schdTa;
#ifdef LTE_ADV
RLOG1(L_ERROR, "MUXing failed for: MacInst %d", inst);
RLOG4(L_ERROR, "MUXing failed for: time: %d/%d\
procId %d ueId %d", hqP->tbInfo[i].timingInfo.sfn,
- hqP->tbInfo[i].timingInfo.subframe, hqP->procId,
+ hqP->tbInfo[i].timingInfo.slot, hqP->procId,
hqP->tbInfo[i].pdcch.rnti);
- RETVALUE(RFAILED);
+ return RFAILED;
}
}
else
#ifdef LTEMAC_RGU_PAD
/* Data not received from RLC. Padding at MAC */
bldPdu.datReq = NULLP;
- bldPdu.reqType = EVTTFUTTIIND;
+ //bldPdu.reqType = EVENT_SLOT_IND_TO_MAC;
bldPdu.schdTbSz = hqP->tbInfo[i].tbSz;
bldPdu.ta = hqP->tbInfo[i].schdTa;
#ifdef LTE_ADV
RLOG1(L_ERROR, "MUXing failed for: MacInst %d", inst);
RLOG4(L_ERROR, "MUXing failed for: time: %d/%d\
procId %d ueId %d", hqP->tbInfo[i].timingInfo.sfn,
- hqP->tbInfo[i].timingInfo.subframe, hqP->procId,
+ hqP->tbInfo[i].timingInfo.slot, hqP->procId,
hqP->tbInfo[i].pdcch.rnti);
- RETVALUE(RFAILED);
+ return RFAILED;
}
#else
/*Padding is not done so data for this UE will not be
rgDHMRlsHqProcTB(cellCb, hqP, 2);
}
- RETVALUE(ROK);
+ return ROK;
}
if (rgGetEventMem(inst,(Ptr *)&datReq, sizeof(TfuDatReqPduInfo),
&(datInfo->memCp)) != ROK)
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
/* Fill the TFU Dat Req with information from Harq Proc */
/* MS_WORKAROUND for ccpu00122894 */
for(i=0;i< RG_MAX_TB_PER_UE;i++)
{
- if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf)
+ if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf)
{
- cmLListDelFrm(&dlSf->tbs, &(hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk));
- hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk.node = NULLP;
+ cmLListDelFrm(&dlSf->tbs, &(hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk));
+ hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk.node = NULLP;
- hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf = NULLP;
+ hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf = NULLP;
}
}
cmLListAdd2Tail(&datInfo->pdus, &(datReq->lnk));
datReq->lnk.node = (PTR)datReq;
- RETVALUE(ROK);
+ return ROK;
} /* rgDHMSndDatReq */
/**
}
rgDHMRlsHqProcTB(rgCb[inst].cell, hqProc, (U8)(j+1));
}
- RETVALUE(RFAILED);
+ return RFAILED;
}
for(i=0;i<datReq->nmbOfTbs;i++)
{
continue;
}
- if (hqProc->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk.node == NULLP)
+ if (hqProc->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk.node == NULLP)
{
/* release corresponding TBs from SF tbs List */
for(j=0;j<datReq->nmbOfTbs;j++)
rgDHMRlsHqProcTB(rgCb[inst].cell, hqProc, (U8)(j+1));
printf("\nrgDHMHndlDedDatReq:: hqP %p \n", (Void *)hqProc);
}
- RETVALUE(RFAILED);
+ return RFAILED;
}
#ifndef L2_OPTMZ
RLOG1(L_ERROR, "MUXing failed for: MacInst %d", inst);
RLOG4(L_ERROR, "MUXing failed for: time: %d/%d\
procId %d ueId %d", hqProc->tbInfo[i].timingInfo.sfn,
- hqProc->tbInfo[i].timingInfo.subframe, hqProc->procId,
+ hqProc->tbInfo[i].timingInfo.slot, hqProc->procId,
hqProc->tbInfo[i].pdcch.rnti);
/* release corresponding TBs from SF tbs List */
}
rgDHMRlsHqProcTB(rgCb[inst].cell, hqProc, (U8)(j+1));
}
- RETVALUE(RFAILED);
+ return RFAILED;
}
/*
SFndLenMsg(hqProc->tbInfo[i].tb, &len);
*/
}
- RETVALUE(ROK);
+ return ROK;
} /* rgDHMHndlDedDatReq */
/**
rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_HARQ);
rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT,
LRG_CAUSE_HQ_PROC_BUSY, &dgn);
- RETVALUE(RFAILED);
+ return RFAILED;
}
bldPdu.datReq = datReq;
RLOG1(L_ERROR, "MUXing failed for: MacInst %d", inst);
RLOG4(L_ERROR, "MUXing failed for: time: %d/%d\
procId %d ueId %d", hqProc->tbInfo[0].timingInfo.sfn,
- hqProc->tbInfo[0].timingInfo.subframe, hqProc->procId,
+ hqProc->tbInfo[0].timingInfo.slot, hqProc->procId,
hqProc->tbInfo[0].pdcch.rnti);
RG_FREE_MSG(datReq->pdu);
- RETVALUE(RFAILED);
+ return RFAILED;
}
- RETVALUE(ROK);
+ return ROK;
} /* rgDHMHndlCmnDatReq */
/**
U8 ueIdx;
U8 lcIdx;
U8 tbIndex=0,idx1;
- RgDlSf *dlSf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+ RgDlSf *dlSf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)];
Inst inst = cell->macInst - RG_INST_START;
// Bool isDStaReqrd = FALSE;
RgRguDedStaInd *dStaInd[rgCb[inst].numRguSaps] ;
#endif
hqP->numOfTBs = allocInfo->nmbOfTBs;
- hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk.node = (PTR)hqP;
- hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.subframe % 2].sf = dlSf;
- cmLListAdd2Tail(&dlSf->tbs,&(hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk));
+ hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk.node = (PTR)hqP;
+ hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.slot % 2].sf = dlSf;
+ cmLListAdd2Tail(&dlSf->tbs,&(hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk));
/* Changes as part of performance testing*/
/* hqP->numOfTBs++;*/
hqP->tbInfo[idx].doa = allocInfo->doa;
{
err->errType = RGERR_DHM_SND_STA_IND;
err->errCause = RG_DHM_MEM_ALLOC_FAIL;
- RETVALUE(RFAILED);
+ return RFAILED;
}
}
cStaInd->rnti = allocInfo->rnti;
cStaInd->lcId = cell->dlCcchId;
cStaInd->transId = (timingInfo.sfn << 16) |
- (timingInfo.subframe << 8) | idx1;
+ (timingInfo.slot << 8) | idx1;
/* ADD Changes for Downlink UE Timing Optimization */
#ifdef LTEMAC_DLUE_TMGOPTMZ
dlSf->remDatReqCnt++;
err->errType = RGERR_DHM_SND_STA_IND;
err->errCause = RG_DHM_MEM_ALLOC_FAIL;
/* Need to return as memory allocation will fail for other UEs also*/
- RETVALUE(RFAILED);
+ return RFAILED;
}
dStaInd[rguDlSpId]->nmbOfUeGrantPerTti = 0;
rguDlSap[rguDlSpId] = ue->rguDlSap;
dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].rnti = allocInfo->rnti;
/*
dStaInd->transId = (hqP->timingInfo.sfn << 16) |
- (hqP->timingInfo.subframe << 8) | hqP->procId;
+ (hqP->timingInfo.slot << 8) | hqP->procId;
*/
dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].transId = (timingInfo.sfn << 16) |
- (timingInfo.subframe << 8) | idx1;
+ (timingInfo.slot << 8) | idx1;
dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].nmbOfTbs = hqP->numOfTBs;
#ifdef LTE_ADV
dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].fillCtrlPdu = allocInfo->fillCtrlPdu;
}
}
- RETVALUE(ROK);
+ return ROK;
} /* rgDHMSndConsolidatedStaInd */
for(i=0;i<RG_MAX_TB_PER_UE;i++)
{
#ifndef L2_OPTMZ
- if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf) &&
+ if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf) &&
(hqP->tbInfo[i].tb != NULLP))
#else
- if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf) &&
+ if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf) &&
RgUtlIsTbMuxed(&(hqP->tbInfo[i].tb)))
#endif
{
if(dbgBufLen == 0)
{
RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
- "RNTI:%d SFN:%d subframe:%d tbIdx:%d Sdu Length 0 ",
+ "RNTI:%d SFN:%d slot:%d tbIdx:%d Sdu Length 0 ",
datReq->rnti,
hqP->tbInfo[i].timingInfo.sfn,
- hqP->tbInfo[i].timingInfo.subframe,i);
+ hqP->tbInfo[i].timingInfo.slot,i);
RLOG_ARG3(L_ERROR,DBG_CELLID,cellCb->cellId,
"taPres [%d] numOfTbs [%d] format[%d]",
datReq->isTApres,
if((tbIndex > RG_MAX_TB_PER_UE) ||
(tbIndex == 0))
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
tb = &(hqP->tbInfo[tbIndex-1].tb);
}
hqP->tbInfo[tbIndex-1].sfLnkInfo[idx].sf = NULLP;
}
- RETVALUE(ROK);
+ return ROK;
}
#endif
{
RGDBGERRNEW(inst,(rgPBuf(inst), "For user [%d]Cell does not exist %d\n",
hqEntInfo->crnti,hqEntInfo->cellId));
- RETVALUE(RFAILED);
+ return RFAILED;
}
if ((ue = rgDBMGetUeCb(cell, hqEntInfo->crnti)) == NULLP)
{
RGDBGERRNEW(inst,(rgPBuf(inst), "[%d]UE does not exist for this hqEntInfo\n",
hqEntInfo->crnti));
- RETVALUE(RFAILED);
+ return RFAILED;
}
rgDHMUeReset(cell, &ue->dl.hqEnt);
- RETVALUE(ROK);
+ return ROK;
}
U32 gSaveVal;
\f
* Function : RgSchMacRlsHqReq
*
* This function shall be invoked whenever scheduler is done with the
- * allocations of random access responses for a subframe.
+ * allocations of random access responses for a slot.
* This shall invoke RAM to create ueCbs for all the rapIds allocated and
* shall invoke MUX to create RAR PDUs for raRntis allocated.
*
if(NULLP == rlshqUeInfo)
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
if((cell == NULLP)
RLOG_ARG0(L_ERROR,DBG_CELLID,rlshqUeInfo->cellId,
"No cellCb found with cellId");
- RETVALUE(RFAILED);
+ return RFAILED;
}
if(NULLP == rlshqUeInfo->ueHqInfo)
{
- RETVALUE(RFAILED);
+ return RFAILED;
}
for(idx1 = 0; idx1 < rlshqUeInfo->numUes; idx1++)
/*starting Task*/
SStopTask(startTime,PID_MAC_AM_HARQ_RLS);
- RETVALUE(ROK);
+ return ROK;
} /* end of RgSchMacRlsHqReq */