ueCb->ueCfg.spCellCfgPres = true;
}
ueCb->state = SCH_UE_STATE_ACTIVE;
- if(ueCfg->ambrCfg != NULLP)
- {
- SCH_ALLOC(ueCb->ueCfg.ambrCfg , sizeof(SchAmbrCfg));
- memcpy(&ueCb->ueCfg.ambrCfg->ulBr , &ueCfg->ambrCfg->ulBr, sizeof(SchAmbrCfg));
- }
+ ueCb->ueCfg.ambrCfg = ueCfg->ambrCfg;
memcpy(&ueCb->ueCfg.dlModInfo, &ueCfg->dlModInfo , sizeof(SchModulationInfo));
memcpy(&ueCb->ueCfg.ulModInfo, &ueCfg->ulModInfo , sizeof(SchModulationInfo));
uint16_t puschSlot = 0;
uint16_t startRb = 0;
uint8_t numRb = 0;
- uint8_t numPdschSymbols= 14;
uint16_t tbSize = 0;
uint8_t buffer = 5;
uint8_t idx = 0;
SchCellCb *cellCb = ueCb->cellCb;
SchUlSlotInfo *schUlSlotInfo = NULLP;
- uint8_t k2=0, startSymb=0 , symbLen=0;
+ uint8_t k2=0, startSymb=0 , symbLen=11;
if(ueCb->ueCfg.spCellCfgPres == true)
{
startRb = cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb;
tbSize = schCalcTbSize(dataVol + buffer); /* 2 bytes header + some buffer */
- numRb = schCalcNumPrb(tbSize, ueCb->ueCfg.ulModInfo.mcsIndex, numPdschSymbols);
+ numRb = schCalcNumPrb(tbSize, ueCb->ueCfg.ulModInfo.mcsIndex, symbLen);
/* increment PUSCH PRB */
cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb += numRb;
{
if(cellCb->schDlSlotInfo[idx])
{
- SCH_FREE(cellCb->schDlSlotInfo[idx]->rarInfo, sizeof(RarInfo));
- if(cellCb->schDlSlotInfo[idx]->dlMsgInfo)
- {
- SCH_FREE(cellCb->schDlSlotInfo[idx]->dlMsgInfo->dlMsgPdu,\
- cellCb->schDlSlotInfo[idx]->dlMsgInfo->dlMsgPduLen);
- SCH_FREE(cellCb->schDlSlotInfo[idx]->dlMsgInfo, sizeof(DlMsgInfo));
- }
SCH_FREE(cellCb->schDlSlotInfo[idx], sizeof(SchDlSlotInfo));
}
}
- SCH_FREE(cellCb->schDlSlotInfo, sizeof(SchDlSlotInfo));
+ SCH_FREE(cellCb->schDlSlotInfo, cellCb->numSlots *sizeof(SchDlSlotInfo*));
}
if(cellCb->schUlSlotInfo)
{
{
if(cellCb->schUlSlotInfo[idx])
{
- SCH_FREE(cellCb->schUlSlotInfo[idx]->schPuschInfo,sizeof(SchPuschInfo));
SCH_FREE(cellCb->schUlSlotInfo[idx], sizeof(SchUlSlotInfo));
}
}
- SCH_FREE(cellCb->schUlSlotInfo, sizeof(SchUlSlotInfo));
+ SCH_FREE(cellCb->schUlSlotInfo, cellCb->numSlots * sizeof(SchUlSlotInfo*));
}
- SCH_FREE(cellCb->cellCfg.sib1SchCfg.sib1PdcchCfg.dci.pdschCfg, sizeof(PdschCfg));
memset(cellCb, 0, sizeof(SchCellCb));
+
}
/*******************************************************************