DuCfgParams duCfgParam;
+/******************************************************************
+ *
+ * @brief Function to fetch lcId based on DRB Id
+ *
+ * @details
+ *
+ * Function : fetchLcId
+ *
+ * @params[in] drbId
+ *
+ * Functionality: Function to fetch lcId based on DRB Id
+ *
+ * Returns: lcId - SUCCESS
+ * RFAILED - FAILURE
+ *****************************************************************/
+
+uint8_t fetchLcId(uint8_t drbId)
+{
+ uint8_t cellIdx = 0, ueIdx = 0, lcIdx = 0, numLcs = 0, lcId = 0;
+
+ for(cellIdx = 0; cellIdx < MAX_NUM_CELL; cellIdx++)
+ {
+ for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++)
+ {
+ if(duCb.actvCellLst[cellIdx] != NULLP)
+ {
+ numLcs = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.numLcs;
+ for(lcIdx = 0; lcIdx < numLcs; lcIdx++)
+ {
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].rbId == drbId && \
+ duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].rbType == RB_TYPE_DRB)
+ {
+ lcId = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].rlcUeCfg.rlcLcCfg[lcIdx].lcId;
+ return lcId;
+ }
+ }
+ }
+ }
+ }
+ DU_LOG("\nERROR --> DU_APP: fetchLcId() failed for drbId %d", drbId);
+ return RFAILED;
+}
+
/************************************************************************
*
* @brief Converts enum values into actual value of Poll retransmit timer
coreset1StartPrb = coreset0EndPrb + 6;
coreset1NumPrb = CORESET1_NUM_PRB;
/* calculate the PRBs */
- freqDomRscAllocType0(((coreset1StartPrb)/6), (coreset1NumPrb/6), freqDomainResource);
+ fillCoresetFeqDomAllocMap(((coreset1StartPrb)/6), (coreset1NumPrb/6), freqDomainResource);
memcpy(controlRSet->frequencyDomainResources.buf, freqDomainResource, FREQ_DOM_RSRC_SIZE);
controlRSet->frequencyDomainResources.bits_unused = bitsUnused;
DU_LOG("\nERROR --> DU_APP: Invalid Rlc Mode %d at freeRlcLcCfg()", lcCfg->rlcMode);
break;
}
+ DU_FREE_SHRABL_BUF(DU_APP_MEM_REGION, DU_POOL, lcCfg->snssai, sizeof(Snssai));
}
/*******************************************************************
}
}
+/*******************************************************************
+*
+* @brief Function to extract Snssai Cfg Info from CU
+*
+* @details
+*
+* Function : extractDrbSnssaiCfg
+*
+* Functionality: Function to extract Drb Snssai Cfg Info from CU
+*
+* @params[in] DRB_Information_t *drbInfo, Snssai *snssai
+* @return ROK/RFAILED
+*
+* ****************************************************************/
+
+uint8_t extractDrbSnssaiCfg(SNSSAI_t *RecvSnssai, Snssai **snssaiToBeShared)
+{
+ if(!(*snssaiToBeShared))
+ {
+ DU_ALLOC_SHRABL_BUF((*snssaiToBeShared), sizeof(Snssai));
+ if(snssaiToBeShared == NULLP)
+ {
+ DU_LOG("\nERROR --> DUAPP : extractDrbSnssaiCfg(): Memory failed at allocating for SNSSAI ");
+ return RFAILED;
+ }
+ }
+ if(RecvSnssai)
+ {
+ memcpy(&(*snssaiToBeShared)->sst, RecvSnssai->sST.buf, RecvSnssai->sST.size);
+ if(RecvSnssai->sD)
+ {
+ memcpy((*snssaiToBeShared)->sd, RecvSnssai->sD->buf, RecvSnssai->sD->size);
+ }
+ else
+ {
+ DU_LOG("\nERROR --> DUAPP : extractDrbSnssaiCfg(): Received Null pointer of Snssai->SD");
+ return RFAILED;
+ }
+ }
+ return ROK;
+}
+
/*******************************************************************
*
* @brief Function to procRlcLcCfg
* ****************************************************************/
void procRlcLcCfg(uint8_t rbId, uint8_t lcId, uint8_t rbType, uint8_t rlcMode,\
- uint8_t configType, RLC_Config_t *f1RlcCfg, RlcBearerCfg *lcCfg)
+ uint8_t configType, RLC_Config_t *f1RlcCfg, RlcBearerCfg *lcCfg, QoSInformation_t *qoSInformation)
{
+ DRB_Information_t *drbInfo;
lcCfg->rbId = rbId;
lcCfg->configType = configType;
{
extractRlcModeCfg(lcCfg->rlcMode, lcCfg, f1RlcCfg);
}
+ if(qoSInformation != NULLP)
+ {
+ if(qoSInformation->present == QoSInformation_PR_choice_extension)
+ {
+ if(qoSInformation->choice.choice_extension->value.present ==\
+ QoSInformation_ExtIEs__value_PR_DRB_Information)
+ {
+ drbInfo = &qoSInformation->choice.choice_extension->value.choice.DRB_Information;
+ if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &lcCfg->snssai) != ROK)
+ {
+ DU_LOG("\nERROR --> DUAPP: Unable to extract Snssai information at procRlcLcCfg()");
+ return RFAILED;
+ }
+ }
+ }
+ }
}
-
-
/*******************************************************************
*
* @brief Fills DrbQos Info received by CU
}
return ROK;
}
+
/*******************************************************************
*
* @brief Function to extract Drb Qos Cfg Info from CU
extractQosInfo(macLcToAdd->drbQos, &drbInfo->dRB_QoS);
macLcToAdd->dlLcCfg.lcp = macLcToAdd->drbQos->ngRanRetPri.priorityLevel;
}
- if(!macLcToAdd->snssai)
- {
- DU_ALLOC_SHRABL_BUF(macLcToAdd->snssai, sizeof(Snssai));
- if(macLcToAdd->snssai == NULLP)
- {
- DU_LOG("\nERROR --> DUAPP : Memory failed at allocating SNSSAI at extractDrbQosCfg()");
- return RFAILED;
- }
- }
- memcpy(&macLcToAdd->snssai->sst, drbInfo->sNSSAI.sST.buf, \
- drbInfo->sNSSAI.sST.size);
- if(drbInfo->sNSSAI.sD)
+ if(extractDrbSnssaiCfg(&drbInfo->sNSSAI, &macLcToAdd->snssai) != ROK)
{
- memcpy(macLcToAdd->snssai->sd, drbInfo->sNSSAI.sD->buf, \
- drbInfo->sNSSAI.sD->size);
+ DU_LOG("\nERROR --> DUAPP: Unable to extract Snssai information at extractDrbQosCfg()");
+ return RFAILED;
}
return ROK;
}
/* Filling RLC/MAC Config*/
memset(&ueCfgDb->macLcCfg[idx], 0, sizeof(LcCfg));
memset(&ueCfgDb->rlcLcCfg[idx], 0, sizeof(RlcBearerCfg));
- procRlcLcCfg(rbId, lcId, rbType, rlcMode, CONFIG_UNKNOWN, f1RlcCfg, &(ueCfgDb->rlcLcCfg[idx]));
+ procRlcLcCfg(rbId, lcId, rbType, rlcMode, CONFIG_UNKNOWN, f1RlcCfg, &(ueCfgDb->rlcLcCfg[idx]), NULLP);
if(procMacLcCfg(lcId, rbType, CONFIG_UNKNOWN, NULL, NULL, NULL, macUlLcCfg, &ueCfgDb->macLcCfg[idx], NULL) != ROK)
{
DU_LOG("\nERROR --> DU APP : Failed while filling MAC LC config at extractRlcCfgToAddMod()");
if(cRsetToAddModList->list.count)
{
macPdcchCfg->numCRsetToAddMod = cRsetToAddModList->list.count;
- for(cRsetIdx = 0; cRsetIdx < cRsetToAddModList->list.count; cRsetIdx++)
- {
- macPdcchCfg->cRSetToAddModList[cRsetIdx].cRSetId = \
- cRsetToAddModList->list.array[cRsetIdx]->controlResourceSetId;
- bitStringToInt(&cRsetToAddModList->list.array[cRsetIdx]->frequencyDomainResources,\
- macPdcchCfg->cRSetToAddModList[cRsetIdx].freqDomainRsrc);
+ for(cRsetIdx = 0; cRsetIdx < cRsetToAddModList->list.count; cRsetIdx++)
+ {
+ macPdcchCfg->cRSetToAddModList[cRsetIdx].cRSetId = \
+ cRsetToAddModList->list.array[cRsetIdx]->controlResourceSetId;
+ //freqDomRsrcBitStringToInt(&cRsetToAddModList->list.array[cRsetIdx]->frequencyDomainResources,\
+ macPdcchCfg->cRSetToAddModList[cRsetIdx].freqDomainRsrc);
+ memcpy(macPdcchCfg->cRSetToAddModList[cRsetIdx].freqDomainRsrc, \
+ cRsetToAddModList->list.array[cRsetIdx]->frequencyDomainResources.buf,
+ cRsetToAddModList->list.array[cRsetIdx]->frequencyDomainResources.size);
+
macPdcchCfg->cRSetToAddModList[cRsetIdx].duration = \
- cRsetToAddModList->list.array[cRsetIdx]->duration;
+ cRsetToAddModList->list.array[cRsetIdx]->duration;
- macPdcchCfg->cRSetToAddModList[cRsetIdx].cceRegMappingType = \
- cRsetToAddModList->list.array[cRsetIdx]->cce_REG_MappingType.present;
+ macPdcchCfg->cRSetToAddModList[cRsetIdx].cceRegMappingType = \
+ cRsetToAddModList->list.array[cRsetIdx]->cce_REG_MappingType.present;
if(macPdcchCfg->cRSetToAddModList[cRsetIdx].cceRegMappingType == CCE_REG_MAPPINGTYPE_PR_INTERLEAVED)
- {
- //TODO: handle the case for Interleaved
+ {
+ //TODO: handle the case for Interleaved
}
macPdcchCfg->cRSetToAddModList[cRsetIdx].precoderGranularity = \
- cRsetToAddModList->list.array[cRsetIdx]->precoderGranularity;
- if(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID)
- {
- macPdcchCfg->cRSetToAddModList[cRsetIdx].dmrsScramblingId= \
- *(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID);
- }
+ cRsetToAddModList->list.array[cRsetIdx]->precoderGranularity;
+ if(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID)
+ {
+ macPdcchCfg->cRSetToAddModList[cRsetIdx].dmrsScramblingId= \
+ *(cRsetToAddModList->list.array[cRsetIdx]->pdcch_DMRS_ScramblingID);
+ }
}
}
-
}
/* Control Resource Set To Release List */
if(cuPdcchCfg->controlResourceSetToReleaseList)
if(cRsetToRelList->list.count)
{
macPdcchCfg->numCRsetToRel = cRsetToRelList->list.count;
- for(cRsetIdx = 0; cRsetIdx < cRsetToRelList->list.count; cRsetIdx++)
- {
+ for(cRsetIdx = 0; cRsetIdx < cRsetToRelList->list.count; cRsetIdx++)
+ {
macPdcchCfg->cRSetToRelList[cRsetIdx] = *(cRsetToRelList->list.array[cRsetIdx]);
- }
+ }
}
}
if(srchSpcToAddModList->list.count)
{
macPdcchCfg->numSearchSpcToAddMod = srchSpcToAddModList->list.count;
- for(srchSpcIdx = 0; srchSpcIdx < srchSpcToAddModList->list.count; srchSpcIdx++)
- {
+ for(srchSpcIdx = 0; srchSpcIdx < srchSpcToAddModList->list.count; srchSpcIdx++)
+ {
macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceId =\
- srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceId;
+ srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceId;
macPdcchCfg->searchSpcToAddModList[srchSpcIdx].cRSetId =\
- *(srchSpcToAddModList->list.array[srchSpcIdx]->controlResourceSetId);
- if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset)
- {
+ *(srchSpcToAddModList->list.array[srchSpcIdx]->controlResourceSetId);
+ if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset)
+ {
macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSlotPeriodicityAndOffset =\
- srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset->present;
+ srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSlotPeriodicityAndOffset->present;
}
if(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot)
{
- bitStringToInt(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot,\
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSymbolsWithinSlot);
+ bitStringToInt(srchSpcToAddModList->list.array[srchSpcIdx]->monitoringSymbolsWithinSlot,\
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].mSymbolsWithinSlot);
}
- if(srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates)
+ if(srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates)
{
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel1 = \
- srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel1;
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel2 = \
- srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel2;
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel4 = \
- srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel4;
-
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel8 = \
- srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel8;
-
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel16 = \
- srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel16;
- }
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel1 = \
+ srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel1;
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel2 = \
+ srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel2;
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel4 = \
+ srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel4;
+
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel8 = \
+ srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel8;
+
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].numCandidatesAggLevel16 = \
+ srchSpcToAddModList->list.array[srchSpcIdx]->nrofCandidates->aggregationLevel16;
+ }
if(srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType)
- {
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType =\
- srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->present;
- if(macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType == SEARCHSPACETYPE_PR_UE_SPECIFIC)
- {
- macPdcchCfg->searchSpcToAddModList[srchSpcIdx].ueSpecificDciFormat =\
- srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->choice.ue_Specific->dci_Formats;
- }
-
- }
- }
+ {
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType =\
+ srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->present;
+ if(macPdcchCfg->searchSpcToAddModList[srchSpcIdx].searchSpaceType == SEARCHSPACETYPE_PR_UE_SPECIFIC)
+ {
+ macPdcchCfg->searchSpcToAddModList[srchSpcIdx].ueSpecificDciFormat =\
+ srchSpcToAddModList->list.array[srchSpcIdx]->searchSpaceType->choice.ue_Specific->dci_Formats;
+ }
+
+ }
+ }
}
}
/* Search space To Rel List */
if(srchSpcToRelList->list.count)
{
macPdcchCfg->numSearchSpcToRel = srchSpcToRelList->list.count;
- for(srchSpcIdx = 0; srchSpcIdx < srchSpcToRelList->list.count; srchSpcIdx++)
- {
+ for(srchSpcIdx = 0; srchSpcIdx < srchSpcToRelList->list.count; srchSpcIdx++)
+ {
macPdcchCfg->searchSpcToRelList[srchSpcIdx] =\
- *(srchSpcToRelList->list.array[srchSpcIdx]);
- }
+ *(srchSpcToRelList->list.array[srchSpcIdx]);
+ }
}
}
}
if(dlBwp->pdcch_Config->choice.setup)
{
macSrvCellCfg->initDlBwp.pdcchPresent = true;
- extractPdcchCfg(dlBwp->pdcch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdcchCfg);
+ if(storedSrvCellCfg)
+ {
+ if(!storedSrvCellCfg->initDlBwp.pdcchPresent)
+ {
+ extractPdcchCfg(dlBwp->pdcch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdcchCfg);
+ }
+ else
+ {
+ extractPdcchCfg(dlBwp->pdcch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdcchCfg);
+ }
+ }
+ else
+ {
+ extractPdcchCfg(dlBwp->pdcch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdcchCfg);
+ }
}
}
if(dlBwp->pdsch_Config)
* ****************************************************************/
uint8_t procSrbListToSetup(SRBs_ToBeSetup_Item_t * srbItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd)
{
- uint8_t ret = ROK;
/* Filling RLC INFO */
- procRlcLcCfg(srbItem->sRBID, srbItem->sRBID, RB_TYPE_SRB, RLC_AM, CONFIG_ADD, NULL, rlcLcToAdd);
+ procRlcLcCfg(srbItem->sRBID, srbItem->sRBID, RB_TYPE_SRB, RLC_AM, CONFIG_ADD, NULL, rlcLcToAdd, NULL);
/* Filling MAC INFO */
- ret = procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL,NULL, NULL, NULL, macLcToAdd, NULL);
- if(ret == RFAILED)
+ if(procMacLcCfg(srbItem->sRBID, RB_TYPE_SRB, CONFIG_ADD, NULL,NULL, NULL, NULL, macLcToAdd, NULL) != ROK)
{
DU_LOG("\nERROR --> F1AP : Failed at MAC LC Cfg in procSrbListToSetup()");
- return ret;
+ return RFAILED;
}
- return ret;
+
+ return ROK;
}
* Functionality: Fills Drb List received by CU
* for both MAC and RLC
*
- * @params[in] SRBs_ToBeSetup_Item_t pointer
- * LcCfg pointer,
- * RlcBearerCfg pointer
+ * @params[in] DRBs_ToBeSetup_Item_t , DRBs_ToBeSetupMod_Item_t,
+ * DRBs_ToBeModified_Item_t , lcId, LcCfg pointer,
+ * RlcBearerCfg , UpTnlCfg, RlcUeCfg
* @return void
*
* ****************************************************************/
uint8_t procDrbListToSetupMod(uint8_t lcId, DRBs_ToBeSetup_Item_t *drbItem,\
-DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo)
+DRBs_ToBeSetupMod_Item_t *drbSetupModItem, DRBs_ToBeModified_Item_t *drbModItem, LcCfg *macLcToAdd, RlcBearerCfg *rlcLcToAdd, UpTnlCfg *upTnlInfo, RlcUeCfg *storedRlcUeCfg)
{
+ uint8_t cfgIdx = 0;
+ RlcMode rlcModeInfo;
if(drbItem != NULLP)
{
/* Filling RLC INFO */
- procRlcLcCfg(drbItem->dRBID, lcId, RB_TYPE_DRB, drbItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd);
+ procRlcLcCfg(drbItem->dRBID, lcId, RB_TYPE_DRB, drbItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd, &drbItem->\
+ qoSInformation);
/* Filling MAC INFO */
if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, drbItem, NULL, NULL, NULL, macLcToAdd, upTnlInfo) != ROK)
}
else if(drbSetupModItem != NULLP)
{
- procRlcLcCfg(drbSetupModItem->dRBID, lcId, RB_TYPE_DRB, drbSetupModItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd);
+ procRlcLcCfg(drbSetupModItem->dRBID, lcId, RB_TYPE_DRB, drbSetupModItem->rLCMode, CONFIG_ADD, NULL, rlcLcToAdd,
+ &drbSetupModItem->qoSInformation);
if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_ADD, NULL, drbSetupModItem, NULL, NULL, macLcToAdd, upTnlInfo) != ROK)
{
{
/* Drb to Mod IEs doesnot have rlcMode to be modified
* in ASN. Hence no change in RLC configurations */
+ if(storedRlcUeCfg != NULLP)
+ {
+ for(cfgIdx = 0; cfgIdx < storedRlcUeCfg->numLcs; cfgIdx++)
+ {
+ if(storedRlcUeCfg->rlcLcCfg[cfgIdx].lcId == lcId)
+ {
+ rlcModeInfo = storedRlcUeCfg->rlcLcCfg[cfgIdx].rlcMode;
+ break;
+ }
+ }
+ }
+
+ procRlcLcCfg(drbModItem->dRBID, lcId, RB_TYPE_DRB, rlcModeInfo, CONFIG_MOD, NULL, rlcLcToAdd, drbModItem->qoSInformation);
if(procMacLcCfg(lcId, RB_TYPE_DRB, CONFIG_MOD, NULL, NULL, drbModItem, NULL, macLcToAdd, upTnlInfo) != ROK)
{
DU_LOG("\nERROR --> F1AP : Failed at RLC LC Cfg in procDrbListToSetupMod()");
* ****************************************************************/
uint8_t extractDrbListToSetupMod(DRBs_ToBeSetup_List_t *drbCfg, DRBs_ToBeSetupMod_List_t *drbSetupModCfg,\
- DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap)
+ DRBs_ToBeModified_List_t *drbModCfg, uint8_t drbCount, DuUeCfg *ueCfgDb, uint32_t *drbBitMap, RlcUeCfg *rlcUeCfg)
{
uint8_t ret, drbIdx, lcId = 0;
DRBs_ToBeSetup_Item_t *drbItem = NULLP;
}
ret = procDrbListToSetupMod(lcId, NULL, NULL, &(drbModItem->value.choice.DRBs_ToBeModified_Item),\
&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs],\
- &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ &ueCfgDb->upTnlInfo[ueCfgDb->numDrb], rlcUeCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetupMod() for Modified List");
{
drbItem = &drbCfg->list.array[drbIdx]->value.choice.DRBs_ToBeSetup_Item;
ret = procDrbListToSetupMod(lcId, drbItem, NULL, NULL, &ueCfgDb->macLcCfg[ueCfgDb->numMacLcs],\
- &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs], &ueCfgDb->upTnlInfo[ueCfgDb->numDrb], rlcUeCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetupMod() for DrbSetup List");
drbSetupModItem = (DRBs_ToBeSetupMod_ItemIEs_t *) drbSetupModCfg->list.array[drbIdx];
ret = procDrbListToSetupMod(lcId, NULL, &(drbSetupModItem->value.choice.DRBs_ToBeSetupMod_Item), NULL,\
&ueCfgDb->macLcCfg[ueCfgDb->numMacLcs], &ueCfgDb->rlcLcCfg[ueCfgDb->numRlcLcs],\
- &ueCfgDb->upTnlInfo[ueCfgDb->numDrb]);
+ &ueCfgDb->upTnlInfo[ueCfgDb->numDrb], rlcUeCfg);
if(ret == RFAILED)
{
DU_LOG("\nERROR --> F1AP : Failed at extractDrbListToSetupMod() for DrbSetupMod List");
break;
}
}
- ueCfgDb->numRlcLcs++;
}
+ ueCfgDb->numRlcLcs++;
ueCfgDb->numMacLcs++;
ueCfgDb->numDrb++;
{
drbCfg = &ueSetReq->protocolIEs.list.array[ieIdx]->value.choice.DRBs_ToBeSetup_List;
- if(extractDrbListToSetupMod(drbCfg, NULL, NULL, drbCfg->list.count, &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap))
+ if(extractDrbListToSetupMod(drbCfg, NULL, NULL, drbCfg->list.count, &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, NULLP))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod()");
//TODO: Update the failure cause in ue context Setup Response
uint8_t duProcGnbDuCfgUpdAckMsg(uint8_t transId)
{
uint8_t ieIdx=0, arrIdx=0,ret=ROK;
- uint8_t ueId =0 , ueIdx =0;
+ uint8_t ueId =0 , ueIdx =0, totalActiveUe = 0;
uint16_t cellId =0, cellIdx =0, crnti=0;
CmLList *f1apPduNode = NULLP;
ReservedF1apPduInfo *f1apPduInfo =NULLP;
ret = duSendCellDeletReq(cellId);
if(ret == RFAILED)
{
- DU_LOG("ERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to send cell delete\
+ DU_LOG("\nERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to send cell delete\
request for cellId[%d]", cellId);
}
}
else
{
- for(ueIdx = 0; ueIdx < duCb.actvCellLst[cellIdx]->numActvUes; ueIdx++)
+ totalActiveUe = duCb.actvCellLst[cellIdx]->numActvUes;
+ while(totalActiveUe)
{
+ if(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].ueState != UE_ACTIVE)
+ {
+ ueIdx++;
+ continue;
+ }
+
crnti = duCb.actvCellLst[cellIdx]->ueCb[ueIdx].crnti;
GET_UE_IDX(crnti,ueId);
+ /* Sending Ue Context release request only for maximum supporting UEs */
ret = BuildAndSendUeContextReleaseReq(cellId, ueId);
if(ret == RFAILED)
{
- DU_LOG("ERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to build and send UE delete\
+ DU_LOG("\nERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): Failed to build and send UE delete\
request for cellId[%d]", cellId);
}
+ ueIdx++;
+ totalActiveUe--;
}
}
}
else
{
- DU_LOG("ERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): CellId [%d] not found", cellId);
+ DU_LOG("\nERROR --> DU_APP : duProcGnbDuCfgUpdAckMsg(): CellId [%d] not found", cellId);
ret = RFAILED;
}
break;
choice.DRBs_ToBeSetupMod_List;
if(extractDrbListToSetupMod(NULL, drbSetupModCfg, NULL, drbSetupModCfg->list.count,\
- &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap))
+ &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, NULL))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod() for DrbSetupModList");
ret = RFAILED;
drbModifiedCfg = &ueContextModifyReq->protocolIEs.list.array[ieIdx]->value.\
choice.DRBs_ToBeModified_List;
if(extractDrbListToSetupMod(NULL, NULL, drbModifiedCfg, drbSetupModCfg->list.count,\
- &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap))
+ &duUeCb->f1UeDb->duUeCfg, &duUeCb->drbBitMap, &duUeCb->rlcUeCfg))
{
DU_LOG("\nERROR --> DU APP : Failed at extractDrbListToSetupMod() for DrbModifiedList");
ret = RFAILED;
break;
}while(true);
- if(ret == ROK)
+ if(ret == ROK && (duCb.actvCellLst[cellId-1]->numActvUes == 0))
{
duCb.actvCellLst[cellId-1]->cellStatus = DELETION_IN_PROGRESS;
ret = duSendCellDeletReq(cellId);
{
for(cellIdx = 0; cellIdx < duCb.numActvCells; cellIdx++)
{
- for(ueIdx = 0; ueIdx < duCb.actvCellLst[cellIdx]->numActvUes; ueIdx++)
+ for(ueIdx = 0; ueIdx < MAX_NUM_UE; ueIdx++)
{
if((duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbDuUeF1apId == gnbDuUeF1apId)&&\
(duCb.actvCellLst[cellIdx]->ueCb[ueIdx].gnbCuUeF1apId == gnbCuUeF1apId))
}
if(!ueIdxFound)
{
- DU_LOG("\nERROR --> F1AP: DuUeCb is not found at procF1UeContextSetupReq()");
+ DU_LOG("\nERROR --> F1AP: DuUeCb is not found at procF1UeContextReleaseCommand()");
ret = RFAILED;
}