X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_ue_mgr.c;h=b78ea4d0d4b81de60e6d47cf69a24734f46cfe13;hb=5d74fef7c9fe6b65a965ceac6bfe812872dab323;hp=37e8e77001ca3053f54a58a3910167ad0f26ff25;hpb=aee73991f728cc127d1ed76d5a52571d916235a4;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index 37e8e7700..b78ea4d0d 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -91,6 +91,8 @@ void SchSendUeCfgRspToMac(SchUeCfg *ueCfg, Inst inst,\ uint8_t MacSchUeCreateReq(Pst *pst, SchUeCfg *ueCfg) { uint8_t idx; + uint8_t lcId; + uint8_t lcIdx; uint16_t ueIdx; SchCellCb *cellCb; SchUeCb *ueCb; @@ -144,12 +146,28 @@ uint8_t MacSchUeCreateReq(Pst *pst, SchUeCfg *ueCfg) /* Fill received Ue Configuration in UeCb */ memset(ueCb, 0, sizeof(SchUeCb)); - - GET_UE_IDX(ueCfg->crnti, ueCb->ueIdx); + ueCb->ueIdx = ueIdx; ueCb->crnti = ueCfg->crnti; memcpy(&ueCb->ueCfg, ueCfg, sizeof(SchUeCfg)); ueCb->state = SCH_UE_STATE_ACTIVE; + + /* Fill SRB1 info */ + for(lcIdx = 0; lcIdx < ueCfg->numLc; lcIdx++) + { + lcId = ueCfg->lcCfgList[lcIdx].lcId; + ueCb->dlLcCtxt[lcId].lcp = ueCfg->lcCfgList[lcIdx].dlLcCfg.lcp; + ueCb->dlLcCtxt[lcId].lcState = SCH_LC_STATE_ACTIVE; + ueCb->dlLcCtxt[lcId].bo = 0; + ueCb->numDlLc++; + + if(ueCfg->lcCfgList[lcIdx].ulLcCfg) + { + /* TODO : Fill UL LC Cfg. As of now for SRB1, it is null */ + } + } + cellCb->numActvUe++; + SET_ONE_BIT(ueCb->ueIdx, cellCb->actvUeBitMap); ueCb->cellCb = cellCb; ueCb->srRcvd = false; @@ -200,6 +218,7 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, S cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb += numRb; + puschInfo->crnti = ueCb->crnti; puschInfo->harqProcId = SCH_HARQ_PROC_ID; puschInfo->resAllocType = SCH_ALLOC_TYPE_1; puschInfo->fdAlloc.startPrb = startRb;