X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch.c;h=a37720130972982738911a90b1b1a138092fa193;hb=b490cd1231cfcc837e8bfccc40c6bb106dceef7c;hp=42146731b360bdc77321a93aa6e4f5e085c785ae;hpb=483d527d19566ecca87eee46a198bab6c890c6bb;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index 42146731b..a37720130 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -65,10 +65,10 @@ #include "sch.h" #include "sch_utils.h" #include "du_log.h" - extern SchCb schCb[SCH_MAX_INST]; extern int8_t coresetIdxTable[MAX_CORESET_INDEX][4]; extern int8_t searchSpaceIdxTable[MAX_SEARCH_SPACE_INDEX][4]; +void SchFillCfmPst(Pst *reqPst,Pst *cfmPst,RgMngmt *cfm); /* local defines */ SchCellCfgCfmFunc SchCellCfgCfmOpts[] = { @@ -306,6 +306,28 @@ SlotIndInfo *slotInd RETVALUE(ROK); } /* macSchSlotInd */ +/******************************************************************* + * + * @brief Processes Rach indication from MAC + * + * @details + * + * Function : macSchRachInd + * + * Functionality: + * Processes Rach indication from MAC + * + * @params[in] + * @return ROK - success + * RFAILED - failure + * + * ****************************************************************/ +int macSchRachInd(Pst *pst, RachIndInfo *rachInd) +{ + DU_LOG("\nSCH : Received Rach indication"); + return ROK; +} + /** * @brief inti cellCb based on cellCfg * @@ -347,6 +369,9 @@ int InitSchCellCb(Inst inst, SchCellCfg *schCellCfg) for(uint8_t idx=0; idxtotalPrb = MAX_NUM_RB; + /* UL Alloc */ + SCH_ALLOC(schUlAlloc, sizeof(SchUlAlloc)); + if(!schUlAlloc) + { + DU_LOG("\nMemory allocation failed in InitSchCellCb"); + return RFAILED; + } + + schDlAlloc->totalPrb = schUlAlloc->totalPrb = MAX_NUM_RB; - for(uint8_t itr=0; itrassignedPrb[itr] = 0; + schUlAlloc->assignedPrb[itr] = 0; } + for(uint8_t itr=0; itrssbInfo[itr], 0, sizeof(SsbInfo)); } cell->dlAlloc[idx] = schDlAlloc; + cell->ulAlloc[idx] = schUlAlloc; + } - schCb[inst].cells[inst] = cell; //Sphoorthi TODO: check if this works + schCb[inst].cells[inst] = cell; DU_LOG("\nCell init completed for cellId:%d", cell->cellId);