X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_slot_ind.c;h=3a23293550393a4fedbda482bb3ea311420a2172;hb=d75d1b078091768f45b83f2a745a25917e03b39d;hp=44864f00bd945da5674f062ae05d2b3221d67907;hpb=3598d47143b36e13dc930b6a079fdc4a67c021c9;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 44864f00b..3a2329355 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -140,7 +140,7 @@ uint8_t schFillBoGrantDlSchedInfo(SchCellCb *cell, DlSchedInfo *dlSchedInfo, DlM uint8_t ueIdx, lcIdx; uint16_t slot; uint16_t crnti = 0; - uint16_t accumalatedSize = 0; + uint32_t accumalatedSize = 0; SchUeCb *ueCb = NULLP; while(cell->boIndBitMap) @@ -176,7 +176,7 @@ uint8_t schFillBoGrantDlSchedInfo(SchCellCb *cell, DlSchedInfo *dlSchedInfo, DlM /* calculation for BO includse RLC and MAC header size */ dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes = \ - ueCb->dlInfo.dlLcCtxt[lcIdx].bo + RLC_HDR_SIZE + MAC_HDR_SIZE; + ueCb->dlInfo.dlLcCtxt[lcIdx].bo + MAC_HDR_SIZE; accumalatedSize += dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes; dlMsgAlloc->numLc++; } @@ -184,7 +184,13 @@ uint8_t schFillBoGrantDlSchedInfo(SchCellCb *cell, DlSchedInfo *dlSchedInfo, DlM } /* pdcch and pdsch data is filled */ - schDlRsrcAllocDlMsg(dlMsgAlloc, cell, crnti, accumalatedSize, slot); + schDlRsrcAllocDlMsg(dlMsgAlloc, cell, crnti, &accumalatedSize, slot); + /* Calculated TB size could be less than the total size requested. + * Hence, updated the scheduled bytes report. Following is valid only for + * one LC. + * TODO : Update the scheduling byte report for multiple LC based on QCI + * and Priority */ + dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc -1].schBytes = accumalatedSize; /* PUCCH resource */ schAllocPucchResource(cell, dlMsgAlloc->crnti, slot); @@ -251,8 +257,10 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) if (sfnSlot % SCH_MIB_TRANS == 0) { dlBrdcstAlloc->ssbTrans = SSB_TRANSMISSION; + if(!cell->firstSsbTransmitted) + cell->firstSsbTransmitted = true; } - else if (sfnSlot % ssb_rep == 0) + else if (cell->firstSsbTransmitted && (sfnSlot % ssb_rep == 0)) { dlBrdcstAlloc->ssbTrans = SSB_REPEAT; } @@ -265,8 +273,10 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst) if(sfnSlot % cell->cellCfg.sib1SchCfg.sib1NewTxPeriod == 0) { dlBrdcstAlloc->sib1Trans = SIB1_TRANSMISSION; + if(!cell->firstSib1Transmitted) + cell->firstSib1Transmitted = true; } - else if (sfnSlot % cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod == 0) + else if (cell->firstSib1Transmitted && (sfnSlot % cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod == 0)) { dlBrdcstAlloc->sib1Trans = SIB1_REPITITION; }