Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[Epic-ID: ODUHIGH-538][Issue-ID: ODUHIGH-575] Deallocating the variables allocated...
[o-du/l2.git]
/
src
/
5gnrsch
/
sch_crc.c
diff --git
a/src/5gnrsch/sch_crc.c
b/src/5gnrsch/sch_crc.c
index
4aa9f81
..
a49096d
100644
(file)
--- a/
src/5gnrsch/sch_crc.c
+++ b/
src/5gnrsch/sch_crc.c
@@
-24,6
+24,7
@@
#include "du_app_mac_inf.h"
#include "mac_sch_interface.h"
#include "sch.h"
#include "du_app_mac_inf.h"
#include "mac_sch_interface.h"
#include "sch.h"
+#include "sch_tmr.h"
#include "sch_utils.h"
/**
#include "sch_utils.h"
/**
@@
-31,7
+32,7
@@
*
* @details
*
*
* @details
*
- * Function :
schProcess
CrcInd
+ * Function :
SchProc
CrcInd
*
* This function process CRC indication
*
*
* This function process CRC indication
*
@@
-41,24
+42,25
@@
* -# ROK
* -# RFAILED
**/
* -# 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;
+ uint16_t crcCnt=0;
uint8_t ueId=0;
SchUlHqProcCb *hqP = NULLP;
uint8_t ueId=0;
SchUlHqProcCb *hqP = NULLP;
-
- while(count <crcInd->numCrcInd)
+ Inst schInst = pst->dstInst - SCH_INST_START;
+ SchCellCb *cell = schCb[schInst].cells[schInst];
+
+ while(crcCnt < crcInd->numCrcInd)
{
GET_UE_ID(crcInd->crnti, ueId);
if (cell->raCb[ueId-1].raState == SCH_RA_STATE_MSG3_PENDING)
{
{
GET_UE_ID(crcInd->crnti, ueId);
if (cell->raCb[ueId-1].raState == SCH_RA_STATE_MSG3_PENDING)
{
- if (crcInd->crcInd[c
ou
nt])
+ if (crcInd->crcInd[c
rcC
nt])
{
/* failure case*/
{
/* failure case*/
- if (cell->raCb[ueId-1].msg3HqProc.tbInfo.txCntr < cell->
cellCfg.schRachCfg.
maxMsg3Tx)
+ if (cell->raCb[ueId-1].msg3HqProc.tbInfo.txCntr < cell->maxMsg3Tx)
{
{
-
addUeToBeSchedule
d(cell, ueId);
+
cell->api->SchCrcIn
d(cell, ueId);
cell->raCb[ueId - 1].retxMsg3HqProc = &cell->raCb[ueId - 1].msg3HqProc;
}
else
cell->raCb[ueId - 1].retxMsg3HqProc = &cell->raCb[ueId - 1].msg3HqProc;
}
else
@@
-78,22
+80,25
@@
uint8_t schProcessCrcInd(CrcIndInfo *crcInd, Inst schInst)
{
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)
;
+
crcCnt++
;
continue;
}
if (cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.first == 0)
{
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);
+ DU_LOG("\nERROR --> SCH: NULL harq stored in ul hq map at slot %d ue id %d\n",\
+ crcInd->timingInfo.slot, ueId);
+ crcCnt++;
continue;
}
hqP = (SchUlHqProcCb*) cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.first->node;
if(hqP == NULLP)
{
continue;
}
hqP = (SchUlHqProcCb*) cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList.first->node;
if(hqP == NULLP)
{
+ crcCnt++;
continue;
}
else
{
continue;
}
else
{
- if (crcInd->crcInd[c
ou
nt])
+ if (crcInd->crcInd[c
rcC
nt])
{
/* failure case*/
schUlHqProcessNack(hqP);
{
/* failure case*/
schUlHqProcessNack(hqP);
@@
-106,10
+111,10
@@
uint8_t schProcessCrcInd(CrcIndInfo *crcInd, Inst schInst)
}
cmLListDelFrm(&(cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList), &hqP->ulSlotLnk);
}
}
cmLListDelFrm(&(cell->ueCb[ueId-1].hqUlmap[crcInd->timingInfo.slot]->hqList), &hqP->ulSlotLnk);
}
- c
ou
nt++;
+ c
rcC
nt++;
}
return ROK;
}
/**********************************************************************
End of file
}
return ROK;
}
/**********************************************************************
End of file
- **********************************************************************/
\ No newline at end of file
+ **********************************************************************/