#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[] =
{
for(uint8_t idx=0; idx<SCH_NUM_SLOTS; idx++)
{
SchDlAlloc *schDlAlloc;
+ SchUlAlloc *schUlAlloc;
+
+ /* DL Alloc */
SCH_ALLOC(schDlAlloc, sizeof(SchDlAlloc));
if(!schDlAlloc)
{
return RFAILED;
}
- schDlAlloc->totalPrb = 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; itr<MAX_SSB_IDX; itr++)
+ for(uint8_t itr=0; itr<SCH_SYMBOL_PER_SLOT; itr++)
{
schDlAlloc->assignedPrb[itr] = 0;
+ schUlAlloc->assignedPrb[itr] = 0;
}
+
for(uint8_t itr=0; itr<MAX_SSB_IDX; itr++)
{
memset(&schDlAlloc->ssbInfo[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);