X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrmac%2Frg_rom.c;h=6e78ce53677561ccb8ee9fee4b1cab1f9ca29427;hb=5ea4c59cb4dd37164953218b0bd355284e11d22c;hp=06886fff97f0c9161b26c4b73062de6aa7a9eac4;hpb=829bbd114f1c3dc00c1da47bca0a8207c049df3f;p=o-du%2Fl2.git diff --git a/src/5gnrmac/rg_rom.c b/src/5gnrmac/rg_rom.c index 06886fff9..6e78ce536 100755 --- a/src/5gnrmac/rg_rom.c +++ b/src/5gnrmac/rg_rom.c @@ -78,6 +78,7 @@ static int RLOG_MODULE_ID=4096; #include "rg_prg.x" /* PRG Interface includes */ #include "lrg.x" /* LRG Interface includes */ +#include "du_app_mac_inf.h" #include "rg.x" /* MAC includes */ /* local defines */ @@ -136,6 +137,7 @@ Inst inst; RgRguDedDatReq *datReq; #endif { +#if 0 RgCellCb *cell; RgUeCb *ue; U8 idx1,idx2; @@ -181,15 +183,15 @@ RgRguDedDatReq *datReq; for(idx = 0; idx < datReq->nmbOfUeGrantPerTti; idx++) { - timingInfo.subframe = (U8)((datReq->datReq[idx].transId >> 8) & 0XFF); + timingInfo.slot = (U8)((datReq->datReq[idx].transId >> 8) & 0XFF); timingInfo.sfn = (U16)((datReq->datReq[idx].transId >> 16) & 0xFFFF); - sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)]; + sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)]; if( (sf->txDone == TRUE) || (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo))) { #if (ERRCLASS & ERRCLS_DEBUG) - /* Transmission is already done for this subframe. This is a delayed + /* Transmission is already done for this slot. This is a delayed * datReq. So discard */ rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM); rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT, @@ -304,7 +306,7 @@ RgRguDedDatReq *datReq; #ifdef CCPU_OPT boRpt.setMaxDlPrio= datReq->datReq[idx].datReqTb[idx1].lchData[idx2].boReport.staPduPrsnt; #endif - //TODO: commented for compilation without SCH RgMacSchDedBoUpdt(&schPst, &boRpt); + RgMacSchDedBoUpdt(&schPst, &boRpt); } } @@ -326,6 +328,7 @@ RgRguDedDatReq *datReq; #endif } /* for loop for num of Ue per TTI*/ +#endif /* Data send successfully to PHY. lets retuns ROK*/ RETVALUE(ROK); } /* rgROMDedDatReq */ @@ -397,7 +400,7 @@ RgRguCmnDatReq *datReq; /*Get the timing Info*/ /* ADD Changes for Downlink UE Timing Optimization */ #ifdef LTEMAC_DLUE_TMGOPTMZ - timingInfo.subframe = (U8)((datReq->transId >> 8) & 0XFF); + timingInfo.slot = (U8)((datReq->transId >> 8) & 0XFF); timingInfo.sfn = (U16)((datReq->transId >> 16) & 0xFFFF); #endif } @@ -408,7 +411,7 @@ RgRguCmnDatReq *datReq; /*Get the timing Info*/ /* ADD Changes for Downlink UE Timing Optimization */ #ifdef LTEMAC_DLUE_TMGOPTMZ - timingInfo.subframe = (U8)(datReq->transId & 0XFF); + timingInfo.slot = (U8)(datReq->transId & 0XFF); timingInfo.sfn = (U16)((datReq->transId >> 8) & 0xFFFF); #endif } @@ -426,8 +429,8 @@ RgRguCmnDatReq *datReq; /* ADD Changes for Downlink UE Timing Optimization */ #ifdef LTEMAC_DLUE_TMGOPTMZ - RG_ARRAY_BOUND_CHECK(0, cell->subFrms, (timingInfo.subframe % RG_NUM_SUB_FRAMES)); - sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)]; + RG_ARRAY_BOUND_CHECK(0, cell->subFrms, (timingInfo.slot % RG_NUM_SUB_FRAMES)); + sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)]; ret = rgROMUpdDlSfRemDataCnt(cell, sf); /*Added check for RFAILED as above function can return RFAILED*/ @@ -497,15 +500,15 @@ RgErrInfo *err; } } - timingInfo.subframe = (U8)((datReq->transId >> 8) & 0XFF); + timingInfo.slot = (U8)((datReq->transId >> 8) & 0XFF); timingInfo.sfn = (U16)((datReq->transId >> 16) & 0xFFFF); - sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)]; + sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)]; if( (sf->txDone == TRUE) || (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo))) { #if (ERRCLASS & ERRCLS_DEBUG) - /* Transmission is already done for this subframe. This is a delayed + /* Transmission is already done for this slot. This is a delayed * datReq. So discard */ rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM); rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT, @@ -585,15 +588,15 @@ RgErrInfo *err; TRC2(rgROMHndlBcchPcchDatReq); - timingInfo.subframe = (U8)(datReq->transId & 0XFF); + timingInfo.slot = (U8)(datReq->transId & 0XFF); timingInfo.sfn = (U16)((datReq->transId >> 8) & 0xFFFF); - sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)]; + sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)]; if( (sf->txDone == TRUE) || (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo))) { #if (ERRCLASS & ERRCLS_DEBUG) - /* Transmission is already done for this subframe. This is a delayed + /* Transmission is already done for this slot. This is a delayed * datReq. So discard */ rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM); rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT, @@ -607,7 +610,7 @@ RgErrInfo *err; bcch = rgDBMGetBcchOnDlsch(cell,datReq->lcId); if (bcch ) { - /* Store BCCH-DLSCH data received in Scheduled subframe */ + /* Store BCCH-DLSCH data received in Scheduled slot */ sf->bcch.tb = datReq->pdu; SCpyMsgMsg(datReq->pdu, RG_GET_MEM_REGION(rgCb[inst]), @@ -619,7 +622,7 @@ RgErrInfo *err; bch = rgDBMGetBcchOnBch(cell); if ((bch) && (bch->lcId == datReq->lcId)) { - /* Store BCH data received in Scheduled subframe */ + /* Store BCH data received in Scheduled slot */ sf->bch.tb = datReq->pdu; RETVALUE(ROK); } @@ -628,7 +631,7 @@ RgErrInfo *err; pcch = rgDBMGetPcch(cell); if ((pcch) && (pcch->lcId == datReq->lcId)) { - /* Store PCCH-DLSCH data received in Scheduled subframe */ + /* Store PCCH-DLSCH data received in Scheduled slot */ sf->pcch.tb = datReq->pdu; RETVALUE(ROK); } @@ -963,7 +966,7 @@ RgErrInfo *err; nextBchSfn = (cell->crntTime.sfn + 4 - (cell->crntTime.sfn%4)) % RG_MAX_SFN; if ((staRsp->u.timeToTx.sfn != nextBchSfn) || - ((staRsp->u.timeToTx.sfn == cell->crntTime.sfn) && (cell->crntTime.subframe >= 7))) + ((staRsp->u.timeToTx.sfn == cell->crntTime.sfn) && (cell->crntTime.slot >= 7))) { RETVALUE(ROK); } @@ -1050,7 +1053,7 @@ RgDlSf *dlSf; if (ROK != rgTOMUtlProcDlSf (dlSf, cellCb, &err)) { RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId, - "Unable to process downlink subframe for cell"); + "Unable to process downlink slot for cell"); err.errType = RGERR_ROM_DEDDATREQ; }