uint8_t ret = ROK;
schUeCfg->cellId = ueCfg->cellId;
+ schUeCfg->ueId = ueCfg->ueId;
schUeCfg->crnti = ueCfg->crnti;
-
+ schUeCfg->dataTransmissionInfo = ueCfg->transmissionAction;
/* Copy MAC cell group config */
if(ueCfg->macCellGrpCfgPres == true)
{
ueCb->dlInfo.dlHarqEnt.numHarqProcs = \
ueCfg->spCellCfg.servCellCfg.pdschServCellCfg.numHarqProcForPdsch;
}
- ueCb->state = UE_STATE_ACTIVE;
+
+ if(ueCfg->crnti)
+ ueCb->state = UE_STATE_ACTIVE;
+ else
+ ueCb->state = UE_HANDIN_IN_PROGRESS;
+
/*TODO: To check the bsr value during implementation */
if(ueCfg->macCellGrpCfgPres)
{
{
DU_LOG("\nERROR --> MAC: Failed while filing MAC LC List at fillMacUeCb()");
}
+ ueCb->transmissionAction = ueCfg->transmissionAction;
return ret;
}
}
else
{
- macCb.macCell[cellIdx]->numActvUe++;
- updateMacRaCb(cellIdx, ueCb);
- return ROK;
+ if(ueCb->state == UE_STATE_ACTIVE)
+ {
+ macCb.macCell[cellIdx]->numActvUe++;
+ updateMacRaCb(cellIdx, ueCb);
+ }
+ return ROK;
}
}
uint8_t ret = ROK;
if((ueCb->ueId == ueCfg->ueId) && (ueCb->crnti == ueCfg->crnti)\
- &&(ueCb->state == UE_STATE_ACTIVE))
+ &&(ueCb->state == UE_STATE_ACTIVE))
{
DU_LOG("\nINFO --> MAC : Modifying Ue config Req for CRNTI %d ", ueCfg->crnti);
ret = fillMacUeCb(ueCb, ueCfg, cellIdx);
else
{
deleteMacRaCb(cellIdx, ueCb);
- return ROK;
+ return ROK;
}
}
return RFAILED;
/* Check if UE already configured */
ueCb = &macCb.macCell[cellIdx]->ueCb[ueCfg->ueId -1];
+
switch(pst->event)
{
case EVENT_UE_CONFIG_RSP_TO_MAC:
- ret = createUeCb(cellIdx, ueCb, ueCfg);
- if(ret != ROK)
- DU_LOG("\nERROR --> MAC: AddUeConfigReq for cellIdx :%d failed in procMacUeCfgData()", cellIdx);
- break;
+ {
+ ret = createUeCb(cellIdx, ueCb, ueCfg);
+ if(ret != ROK)
+ DU_LOG("\nERROR --> MAC: AddUeConfigReq for cellIdx :%d failed in procMacUeCfgData()", cellIdx);
+ break;
+ }
+
case EVENT_UE_RECONFIG_RSP_TO_MAC:
- ret = modifyUeCb(cellIdx, ueCb, ueCfg);
- if(ret != ROK)
- DU_LOG("\nERROR --> MAC: ModifyUeConfigReq for cellIdx :%d failed at procMacUeCfgData()", cellIdx);
- break;
+ {
+ ret = modifyUeCb(cellIdx, ueCb, ueCfg);
+ if(ret != ROK)
+ DU_LOG("\nERROR --> MAC: ModifyUeConfigReq for cellIdx :%d failed at procMacUeCfgData()", cellIdx);
+ break;
+ }
+
default:
- break;
+ break;
}
return ret;
if(ret == ROK)
{
/*Sending Cfg Req to SCH */
- ret = fillSchUeCfg(pst, &schUeCfg, ueCfg);
- if(ret != ROK)
- DU_LOG("\nERROR --> MAC : Failed to fill Sch Ue Cfg at MacProcUeCreateReq()");
- else
- {
+ ret = fillSchUeCfg(pst, &schUeCfg, ueCfg);
+ if(ret != ROK)
+ DU_LOG("\nERROR --> MAC : Failed to fill Sch Ue Cfg at MacProcUeCreateReq()");
+ else
+ {
/* Fill event and send UE create request to SCH */
ret = sendUeReqToSch(pst, &schUeCfg);
- if(ret != ROK)
- DU_LOG("\nERROR --> MAC : Failed to send UE Create request to SCH");
- }
+ if(ret != ROK)
+ DU_LOG("\nERROR --> MAC : Failed to send UE Create request to SCH");
+ }
}
else
{
- DU_LOG("\nERROR --> MAC : Failed to store MAC UE CFG ");
+ DU_LOG("\nERROR --> MAC : Failed to store MAC UE CFG ");
}
}
else