X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch.c;h=1b1daed427922e2c4b9f9c1a69cbcb089a786ce5;hb=15c1e4f846f9935150615a5e9e7f94500bd62790;hp=12f0bbbffdebe1551657b87a3887e37405ce1b08;hpb=9c8b78da0f4ef42dae5e30a3061463b81327e7a0;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index 12f0bbbff..1b1daed42 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -48,7 +48,7 @@ #include "sch.h" #include "sch_utils.h" -extern SchCb schCb[SCH_MAX_INST]; +SchCb schCb[SCH_MAX_INST]; void SchFillCfmPst(Pst *reqPst,Pst *cfmPst,RgMngmt *cfm); /* local defines */ @@ -113,7 +113,7 @@ uint8_t schActvInit(Ent entity, Inst instId, Region region, Reason reason) * reason for success/failure of this function. * * @param[in] RgCfg *cfg, the Configuaration information - * @return U16 + * @return uint16_t * -# LCM_REASON_NOT_APPL * -# LCM_REASON_INVALID_MSGTYPE * -# LCM_REASON_MEM_NOAVAIL @@ -193,8 +193,8 @@ uint8_t SchInstCfg(RgCfg *cfg, Inst dInst) **/ uint8_t SchProcGenCfgReq(Pst *pst, RgMngmt *cfg) { - uint8_t ret = LCM_PRIM_OK; - uint16_t reason = LCM_REASON_NOT_APPL; + uint8_t ret = LCM_PRIM_OK; + uint16_t reason = LCM_REASON_NOT_APPL; RgMngmt cfm; Pst cfmPst; @@ -264,7 +264,6 @@ uint8_t MacSchSlotInd(Pst *pst, SlotIndInfo *slotInd) { Inst inst = pst->dstInst-SCH_INST_START; - /* Now call the TOM (Tfu ownership module) primitive to process further */ schProcessSlotInd(slotInd, inst); return ROK; @@ -463,7 +462,7 @@ void fillSchSib1Cfg(Inst schInst, SchSib1Cfg *sib1SchCfg, uint16_t pci, \ sib1SchCfg->n0 = slotIndex; /* calculate the PRBs */ - schAllocFreqDomRscType0(((offsetPointA-offset)/6), (numRbs/6), FreqDomainResource); + freqDomRscAllocType0(((offsetPointA-offset)/6), (numRbs/6), FreqDomainResource); /* fill BWP */ bwp->freqAlloc.numPrb = MAX_NUM_RB; /* whole of BW */ @@ -672,7 +671,6 @@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) Inst inst = pst->dstInst-SCH_INST_START; DU_LOG("\nSCH : Received RLC BO Status indication"); - cell = schCb[inst].cells[inst]; GET_UE_IDX(dlBoInfo->crnti, ueIdx); @@ -683,7 +681,7 @@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo) (lcId >= MIN_DRB_LCID && lcId <= MAX_DRB_LCID)) { SET_ONE_BIT(ueIdx, cell->boIndBitMap); - ueCb->dlLcCtxt[lcId].bo = dlBoInfo->dataVolume; + ueCb->dlInfo.dlLcCtxt[lcId].bo = dlBoInfo->dataVolume; } else if(lcId != SRB0_LCID) { @@ -740,7 +738,6 @@ uint8_t MacSchBsr(Pst *pst, UlBufferStatusRptInd *bsrInd) uint8_t lcgIdx; DU_LOG("\nSCH : Received BSR"); - cellCb = schCb[schInst].cells[schInst]; ueCb = schGetUeCb(cellCb, bsrInd->crnti); @@ -778,6 +775,7 @@ uint8_t MacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd) SchCellCb *cellCb = schCb[inst].cells[inst]; DU_LOG("\nSCH : Received SR"); + ueCb = schGetUeCb(cellCb, uciInd->crnti); if(uciInd->numSrBits)