X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_slot_ind.c;h=44864f00bd945da5674f062ae05d2b3221d67907;hb=631549c756e38e4f42032059f40de4d030c1dddc;hp=6769eeb3120a48843fc4e07718e3d387de0e9a98;hpb=2193e4cf01012809495be026097e8d7eacb9f0ac;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 6769eeb31..44864f00b 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -49,8 +49,8 @@ SchMacDlAllocFunc schMacDlAllocOpts[] = packSchMacDlAlloc }; -extern SchCb schCb[SCH_MAX_INST]; -extern int schFillRar(RarAlloc *rarAlloc, uint16_t raRnti, uint16_t pci, uint8_t +SchCb schCb[SCH_MAX_INST]; +int schFillRar(RarAlloc *rarAlloc, uint16_t raRnti, uint16_t pci, uint8_t offsetPointA); /******************************************************************* @@ -155,7 +155,7 @@ uint8_t schFillBoGrantDlSchedInfo(SchCellCb *cell, DlSchedInfo *dlSchedInfo, DlM SCH_ALLOC(dlMsgAlloc, sizeof(DlMsgAlloc)); if(!dlMsgAlloc) { - DU_LOG("\nMAC: Memory Allocation failed for ded DL msg alloc"); + DU_LOG("\nERROR --> SCH : Memory Allocation failed for ded DL msg alloc"); return RFAILED; } memset(dlMsgAlloc, 0, sizeof(DlMsgAlloc)); @@ -170,17 +170,17 @@ uint8_t schFillBoGrantDlSchedInfo(SchCellCb *cell, DlSchedInfo *dlSchedInfo, DlM dlMsgAlloc->numLc = 0; for(lcIdx = 0; lcIdx < MAX_NUM_LC; lcIdx++) { - if(ueCb->dlLcCtxt[lcIdx].bo) + if(ueCb->dlInfo.dlLcCtxt[lcIdx].bo) { dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].lcId = lcIdx; /* calculation for BO includse RLC and MAC header size */ dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes = \ - ueCb->dlLcCtxt[lcIdx].bo + RLC_HDR_SIZE + MAC_HDR_SIZE; + ueCb->dlInfo.dlLcCtxt[lcIdx].bo + RLC_HDR_SIZE + MAC_HDR_SIZE; accumalatedSize += dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes; dlMsgAlloc->numLc++; } - ueCb->dlLcCtxt[lcIdx].bo = 0; + ueCb->dlInfo.dlLcCtxt[lcIdx].bo = 0; } /* pdcch and pdsch data is filled */ @@ -240,8 +240,8 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo)); dlBrdcstAlloc->ssbIdxSupported = 1; - sfnSlot = ((dlSchedInfo.schSlotValue.broadcastTime.sfn * 10) + - dlSchedInfo.schSlotValue.broadcastTime.slot); + sfnSlot = dlSchedInfo.schSlotValue.broadcastTime.sfn * cell->numSlots + + dlSchedInfo.schSlotValue.broadcastTime.slot; slot = dlSchedInfo.schSlotValue.currentTime.slot; @@ -282,7 +282,7 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) ret = schBroadcastAlloc(cell,dlBrdcstAlloc,slot); if(ret != ROK) { - DU_LOG("\nschBroadcastAlloc failed"); + DU_LOG("\nERROR --> SCH : schBroadcastAlloc failed"); return (ret); } } @@ -294,7 +294,7 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) SCH_ALLOC(rarAlloc, sizeof(RarAlloc)); if(!rarAlloc) { - DU_LOG("\nMAC: Memory Allocation failed for RAR alloc"); + DU_LOG("\nERROR --> SCH : Memory Allocation failed for RAR alloc"); return RFAILED; } @@ -322,7 +322,7 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) SCH_ALLOC(msg4Alloc, sizeof(DlMsgAlloc)); if(!msg4Alloc) { - DU_LOG("\nMAC: Memory Allocation failed for msg4 alloc"); + DU_LOG("\nERROR --> SCH : Memory Allocation failed for msg4 alloc"); return RFAILED; } @@ -369,7 +369,7 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) SCH_ALLOC(dciInfo, sizeof(DciInfo)); if(!dciInfo) { - DU_LOG("\nMAC: Memory Allocation failed for dciInfo alloc"); + DU_LOG("\nERROR --> SCH : Memory Allocation failed for dciInfo alloc"); return RFAILED; } memset(dciInfo,0,sizeof(DciInfo)); @@ -396,7 +396,7 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) ret = sendDlAllocToMac(&dlSchedInfo, schInst); if(ret != ROK) { - DU_LOG("\nSending DL Broadcast allocation from SCH to MAC failed"); + DU_LOG("\nERROR --> SCH : Sending DL Broadcast allocation from SCH to MAC failed"); return (ret); }