Pst rspPst;
cfgRsp->cellId = ueCfg->cellId;
- cfgRsp->duUeF1apId = ueCfg->duUeF1apId;
+ cfgRsp->ueId = ueCfg->ueId;
cfgRsp->crnti = ueCfg->crnti;
cfgRsp->rsp = result;
bool isLcIdValid = FALSE;
ueCb->ueCfg.cellId = ueCfg->cellId;
- ueCb->ueCfg.duUeF1apId = ueCfg->duUeF1apId;
+ ueCb->ueCfg.ueId = ueCfg->ueId;
ueCb->ueCfg.crnti = ueCfg->crnti;
ueCb->ueCfg.dataTransmissionAction = ueCfg->dataTransmissionInfo;
if(ueCfg->macCellGrpCfgPres == true)
if(ueCfg->spCellCfgPres == true)
{
+ if(ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfgPres == true)
+ {
+ if(ueCb->ueCfg.spCellCfgPres && ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdschCfgPres == true)
+ {
+ for(uint8_t idx = 0; idx < ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg.numTimeDomRsrcAlloc; idx++)
+ {
+ if(ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0 && ueCfg->spCellCfg.servCellCfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0)
+ {
+ SCH_FREE(ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdschCfg.timeDomRsrcAllociList[idx].k0, sizeof(uint8_t));
+ }
+ }
+ }
+ }
memcpy(&ueCb->ueCfg.spCellCfg , &ueCfg->spCellCfg, sizeof(SchSpCellCfg));
covertFreqDomRsrcMapToIAPIFormat(ueCb->ueCfg.spCellCfg.servCellCfg.initDlBwp.pdcchCfg.cRSetToAddModList[0].freqDomainRsrc,\
* ****************************************************************/
uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfg)
{
- uint8_t ueId, lcIdx, ret = ROK;
+ uint8_t lcIdx = 0, ret = ROK;
SchCellCb *cellCb = NULLP;
SchUeCb *ueCb = NULLP;
SchUeCfgRsp cfgRsp;
cellCb = getSchCellCb(pst->event, inst, ueCfg);
/* Search if UE already configured */
- if(ueCfg->crnti)
- {
- GET_UE_ID(ueCfg->crnti, ueId);
- ueCb = &cellCb->ueCb[ueId -1];
- }
- else
- ueCb = &cellCb->hoUeCb[ueCfg->duUeF1apId - 1];
+ ueCb = &cellCb->ueCb[ueCfg->ueId - 1];
if((ueCb->crnti == ueCfg->crnti) && (ueCb->state == SCH_UE_STATE_ACTIVE))
{
/* Fill received Ue Configuration in UeCb */
memset(ueCb, 0, sizeof(SchUeCb));
- ueCb->ueId = ueId;
+ ueCb->ueId = ueCfg->ueId;
ueCb->crnti = ueCfg->crnti;
- if(ueCb->crnti)
- ueCb->state = SCH_UE_STATE_ACTIVE;
- else
- ueCb->state = SCH_UE_HANDIN_IN_PROGRESS;
ret = fillSchUeCb(inst, ueCb, ueCfg);
if(ret == ROK)
{
- if(ueCb->state == SCH_UE_STATE_ACTIVE)
+ /* If UE has initiated RACH and then UE context is created, it means UE is
+ * active now.
+ * Else if UE context is created before RACH, this means that UE is being
+ * handed-in from source DU */
+ if(cellCb->raCb[ueCb->ueId-1].tcrnti == ueCb->crnti)
{
cellCb->numActvUe++;
SET_ONE_BIT(ueCb->ueId, cellCb->actvUeBitMap);
+ ueCb->state = SCH_UE_STATE_ACTIVE;
+ }
+ else
+ {
+ ueCb->state = SCH_UE_HANDIN_IN_PROGRESS;
}
+
ueCb->cellCb = cellCb;
ueCb->srRcvd = false;
ueCb->bsrRcvd = false;
uint8_t sliceIdx=0, slotIdx=0;
CmLListCp *list=NULL;
CmLList *node=NULL, *next=NULL;
+ SchPageInfo *tempNode = NULLP;
if(cellCb->schDlSlotInfo)
{
}
SCH_FREE(cellCb->cellCfg.plmnInfoList.snssai, cellCb->cellCfg.plmnInfoList.numSliceSupport*sizeof(Snssai*));
}
+
+ for(uint16_t idx =0; idx<MAX_SFN; idx++)
+ {
+ list = &cellCb->pageCb.pageIndInfoRecord[idx];
+ node = list->first;
+ while(node)
+ {
+ next = node->next;
+ if(node->node)
+ {
+ tempNode = (SchPageInfo*)(node->node);
+ SCH_FREE(tempNode->pagePdu, tempNode->msgLen);
+ SCH_FREE(node->node, sizeof(SchPageInfo));
+ }
+ deleteNodeFromLList(list, node);
+ node = next;
+ }
+ }
/* Remove all UE from ueToBeScheduled list and deallocate */
node = cellCb->ueToBeScheduled.first;