uint8_t schCalcPrachNumRb(SchCellCb *cell)
{
uint8_t tableIdx = 0;
- uint16_t puschScs = fetchScsValue(cell->cellCfg.schInitialUlBwp.bwp.scs);
+ uint16_t puschScs = convertScsEnumValToScsVal(cell->cellCfg.schInitialUlBwp.bwp.scs);
for(tableIdx=0; tableIdx < MAX_RACH_NUM_RB_IDX; tableIdx++)
{
if(cell == NULLP)
{
DU_LOG("\nERROR --> SCH : schPrachResAlloc(): Received cellCb is null");
- return RFAILED;
+ return;
}
/* If this slot is not a PRACH occassion, return */
**/
void createSchRaCb(uint16_t tcrnti, Inst schInst)
{
- uint8_t ueIdx = 0;
+ uint8_t ueId = 0;
- GET_UE_IDX(tcrnti, ueIdx);
- schCb[schInst].cells[schInst]->raCb[ueIdx -1].tcrnti = tcrnti;
- schCb[schInst].cells[schInst]->raCb[ueIdx -1].msg4recvd = FALSE;
+ GET_UE_ID(tcrnti, ueId);
+ schCb[schInst].cells[schInst]->raCb[ueId -1].tcrnti = tcrnti;
+ schCb[schInst].cells[schInst]->raCb[ueId -1].msg4recvd = FALSE;
}
/**
* @param[in] Current timing of the cell
* @return ROK
**/
-bool schProcessRaReq(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId)
+bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId)
{
bool k2Found = false;
uint8_t k0TblIdx = 0, k2TblIdx = 0;
}
/* Allocate resources for msg3 */
- msg3PuschInfo = schAllocMsg3Pusch(cell->instIdx, cell->raReq[ueId-1]->rachInd->crnti, k2Index, msg3Time);
+ msg3PuschInfo = schAllocMsg3Pusch(schInst, cell->raReq[ueId-1]->rachInd->crnti, k2Index, msg3Time);
if(msg3PuschInfo)
{
/* Fill RAR info */
cell->schUlSlotInfo[msg3Time.slot]->puschUe = ueId;
/* Create raCb at SCH */
- createSchRaCb(cell->raReq[ueId-1]->rachInd->crnti, cell->instIdx);
+ createSchRaCb(cell->raReq[ueId-1]->rachInd->crnti, schInst);
/* Remove RachInd from pending RA request list */
SCH_FREE(cell->raReq[ueId-1]->rachInd, sizeof(RachIndInfo));
SchRaReq *raReq = NULLP;
float slotDuration;
uint8_t winNumSlots;
- uint8_t ueIdx;
+ uint8_t ueId;
if(cell == NULLP)
{
}
/* Storing RA request in cellCb */
- GET_UE_IDX(rachInd->crnti, ueIdx);
- if(ueIdx <= 0)
+ GET_UE_ID(rachInd->crnti, ueId);
+ if(ueId <= 0)
{
DU_LOG("\nERROR --> SCH: Invalid CRNTI [%d]", rachInd->crnti);
return RFAILED;
/* Adding window size to window start time to get window end time */
ADD_DELTA_TO_TIME(raReq->winStartTime, raReq->winEndTime, winNumSlots);
- cell->raReq[ueIdx -1] = raReq;
+ cell->raReq[ueId -1] = raReq;
/* Adding UE Id to list of pending UEs to be scheduled */
- addUeToBeScheduled(cell, ueIdx);
+ addUeToBeScheduled(cell, ueId);
return ROK;
}