X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_crc.c;h=3730988a68b417afaf44c1feddf844060eb9b734;hb=1848207fc6601561cbac8cbb5950d1c6e80f2bea;hp=406d67f4fbc20f5b4a8bc9e9524ca1d5c1b23902;hpb=0ee9d868ee051d37995fa518c7f7c908d10ebc27;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_crc.c b/src/5gnrsch/sch_crc.c index 406d67f4f..3730988a6 100644 --- a/src/5gnrsch/sch_crc.c +++ b/src/5gnrsch/sch_crc.c @@ -31,7 +31,7 @@ * * @details * - * Function : schProcessCrcInd + * Function : SchProcCrcInd * * This function process CRC indication * @@ -41,13 +41,14 @@ * -# ROK * -# RFAILED **/ -uint8_t schProcessCrcInd(CrcIndInfo *crcInd, Inst schInst) +uint8_t SchProcCrcInd(Pst *pst, CrcIndInfo *crcInd) { - SchCellCb *cell = schCb[schInst].cells[schInst]; uint16_t count=0; uint8_t ueId=0; SchUlHqProcCb *hqP = NULLP; - + Inst schInst = pst->dstInst - SCH_INST_START; + SchCellCb *cell = schCb[schInst].cells[schInst]; + while(count numCrcInd) { GET_UE_ID(crcInd->crnti, ueId); @@ -56,9 +57,9 @@ uint8_t schProcessCrcInd(CrcIndInfo *crcInd, Inst schInst) if (crcInd->crcInd[count]) { /* failure case*/ - if (cell->raCb[ueId-1].msg3HqProc.tbInfo.txCntr < cell->cellCfg.schRachCfg.maxMsg3Tx) + if (cell->raCb[ueId-1].msg3HqProc.tbInfo.txCntr < cell->maxMsg3Tx) { - addUeToBeScheduled(cell, ueId); + cell->api->SchCrcInd(cell, ueId); cell->raCb[ueId - 1].retxMsg3HqProc = &cell->raCb[ueId - 1].msg3HqProc; } else @@ -76,38 +77,35 @@ uint8_t schProcessCrcInd(CrcIndInfo *crcInd, Inst schInst) } else { - if(cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]) + if (cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.count == 0) { - if (cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.count == 0) - { - DU_LOG("\n ERROR no harq stored in ul hq map at slot %d ue id %d\n",crcInd->timingInfo.slot, ueId); - continue; - } - if (cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.first == 0) - { - DU_LOG("\n ERROR NULL harq stored in ul hq map at slot %d ue id %d\n",crcInd->timingInfo.slot, ueId); - continue; - } - hqP = (SchUlHqProcCb*) cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.first->node; - if(hqP == NULLP) - { - continue; + DU_LOG("\n ERROR no harq stored in ul hq map at slot %d ue id %d\n",crcInd->timingInfo.slot, ueId); + continue; + } + if (cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.first == 0) + { + DU_LOG("\n ERROR NULL harq stored in ul hq map at slot %d ue id %d\n",crcInd->timingInfo.slot, ueId); + continue; + } + hqP = (SchUlHqProcCb*) cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.first->node; + if(hqP == NULLP) + { + continue; + } + else + { + if (crcInd->crcInd[count]) + { + /* failure case*/ + schUlHqProcessNack(hqP); } else { - if (crcInd->crcInd[count]) - { - /* failure case*/ - schUlHqProcessNack(hqP); - } - else - { - /* pass case*/ - schUlHqProcessAck(hqP); - } + /* pass case*/ + schUlHqProcessAck(hqP); } - cmLListDelFrm(&(cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList), &hqP->ulSlotLnk); } + cmLListDelFrm(&(cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList), &hqP->ulSlotLnk); } count++; }