* ****************************************************************/
void FreePuschTimeDomAllocList(PUSCH_Config_t *puschCfg)
{
- uint8_t idx1=0;
- uint8_t idx2=0;
+ uint8_t rsrcListIdx=0;
struct PUSCH_Config__pusch_TimeDomainAllocationList *timeDomAllocList_t=NULLP;
if(puschCfg->pusch_TimeDomainAllocationList)
timeDomAllocList_t=puschCfg->pusch_TimeDomainAllocationList;
if(timeDomAllocList_t->choice.setup)
{
- if(timeDomAllocList_t->choice.setup->list.array)
- {
- DU_FREE(timeDomAllocList_t->choice.setup->list.array[idx2]->k2, sizeof(long));
- for(idx1 = 0; idx1<timeDomAllocList_t->choice.setup->list.count; idx1++)
- {
- DU_FREE(timeDomAllocList_t->choice.setup->list.array[idx1],\
- sizeof(PUSCH_TimeDomainResourceAllocation_t));
- }
- DU_FREE(timeDomAllocList_t->choice.setup->list.array, \
- timeDomAllocList_t->choice.setup->list.size);
- }
- DU_FREE(timeDomAllocList_t->choice.setup, \
- sizeof(struct PUSCH_TimeDomainResourceAllocationList));
+ if(timeDomAllocList_t->choice.setup->list.array)
+ {
+ for(rsrcListIdx = 0; rsrcListIdx<timeDomAllocList_t->choice.setup->list.count; rsrcListIdx++)
+ {
+ DU_FREE(timeDomAllocList_t->choice.setup->list.array[rsrcListIdx]->k2, sizeof(long));
+ DU_FREE(timeDomAllocList_t->choice.setup->list.array[rsrcListIdx],\
+ sizeof(PUSCH_TimeDomainResourceAllocation_t));
+ }
+ DU_FREE(timeDomAllocList_t->choice.setup->list.array, \
+ timeDomAllocList_t->choice.setup->list.size);
+ }
+ DU_FREE(timeDomAllocList_t->choice.setup, \
+ sizeof(struct PUSCH_TimeDomainResourceAllocationList));
}
DU_FREE(puschCfg->transformPrecoder, sizeof(long));
DU_FREE(puschCfg->pusch_TimeDomainAllocationList, \
- sizeof(struct PUSCH_Config__pusch_TimeDomainAllocationList));
+ sizeof(struct PUSCH_Config__pusch_TimeDomainAllocationList));
}
}
*
* Functionality: Fills PdschCfg received by CU
*
- * @params[in] PDSCH_Config_t *cuPdschCfg,
- * PdschConfig *macPdschCfg
+ * @params[in] PDSCH_Config_t *cuPdschCfg = Information which is send by CU,
+ * which we have stored in F1UeContextSetupDb,
+ * PdschConfig *macPdschCfg = Used to Store the information which
+ * needs to send in other layer, as well as this can be the variable
+ * which stores the information in DuCb,
+ * PdschConfig *storedPdschCfg = Null in case of sending the
+ * information to other layer else it will have stored pdsch
+ * configuration in copyOfmacUeCfg.
* @return void
*
* ****************************************************************/
-void extractPdschCfg(PDSCH_Config_t *cuPdschCfg, PdschConfig *macPdschCfg)
+void extractPdschCfg(PDSCH_Config_t *cuPdschCfg, PdschConfig *macPdschCfg, PdschConfig *storedPdschCfg)
{
uint8_t timeDomIdx;
struct PDSCH_Config__pdsch_TimeDomainAllocationList *timeDomAlloc = NULLP;
{
if(macPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0 == NULL)
{
- DU_ALLOC_SHRABL_BUF(macPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0, sizeof(uint8_t));
+ if(storedPdschCfg)
+ {
+ if(storedPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0)
+ {
+ macPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0 =\
+ storedPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0;
+ }
+ else
+ {
+ DU_ALLOC_SHRABL_BUF(macPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0, sizeof(uint8_t));
+ }
+ }
+ else
+ {
+ DU_ALLOC_SHRABL_BUF(macPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0, sizeof(uint8_t));
+ }
if(!macPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0)
{
DU_LOG("\nERROR --> DU APP : Memory allocation failed for k0 at extractPdschCfg()");
}
}
*(macPdschCfg->timeDomRsrcAllociList[timeDomIdx].k0) = \
- *(timeDomAlloc->choice.setup->list.array[timeDomIdx]->k0);
+ *(timeDomAlloc->choice.setup->list.array[timeDomIdx]->k0);
}
macPdschCfg->timeDomRsrcAllociList[timeDomIdx].mappingType = \
timeDomAlloc->choice.setup->list.array[timeDomIdx]->mappingType;
*
* Functionality: Fills PucchCfg received by CU
*
- * @params[in] BWP_UplinkDedicated__pucch_Config *cuPucchCfg,
- * PucchCfg *macPucchCfg
+ * @params[in] BWP_UplinkDedicated__pucch_Config *cuPucchCfg = Information which
+ * is send by CU, which we have stored in F1UeContextSetupDb,
+ * PucchCfg *macPucchCfg = Used to Store the information which
+ * needs to send in other layer, as well as this can be the variable
+ * which stores the information in DuCb,
+ * PucchCfg *storedPucchCfg = Null in case of sending the
+ * information to other layer else it will have Pucch Cfg which
+ * we have stored in copyOfmacUeCfg.
* @return ROK/RFAILED
*
* ****************************************************************/
-uint8_t extractPucchCfg(struct BWP_UplinkDedicated__pucch_Config *cuPucchCfg, PucchCfg *macPucchCfg)
+uint8_t extractPucchCfg(struct BWP_UplinkDedicated__pucch_Config *cuPucchCfg, PucchCfg *macPucchCfg,\
+PucchCfg *storedPucchCfg)
{
uint8_t arrIdx;
/* Dl_DataToUL_ACK */
if(cuPucchCfg->choice.setup->dl_DataToUL_ACK)
- {
+ {
+ if(storedPucchCfg)
+ {
+ if(storedPucchCfg->dlDataToUlAck)
+ {
+ macPucchCfg->dlDataToUlAck = storedPucchCfg->dlDataToUlAck;
+ }
+ else
+ {
DU_ALLOC_SHRABL_BUF(macPucchCfg->dlDataToUlAck, sizeof(PucchDlDataToUlAck));
- if(macPucchCfg->dlDataToUlAck == NULLP)
- {
- DU_LOG("\nERROR --> F1AP : Failed to extract Dl_DataToUL_ACK in extractPucchCfg()");
- return RFAILED;
- }
- memset(macPucchCfg->dlDataToUlAck, 0, sizeof(PucchDlDataToUlAck));
- macPucchCfg->dlDataToUlAck->dlDataToUlAckListCount = cuPucchCfg->choice.setup->dl_DataToUL_ACK->list.count;
- for(arrIdx = 0; arrIdx < macPucchCfg->dlDataToUlAck->dlDataToUlAckListCount; arrIdx++)
- {
- macPucchCfg->dlDataToUlAck->dlDataToUlAckList[arrIdx] =\
- *cuPucchCfg->choice.setup->dl_DataToUL_ACK->list.array[arrIdx];
- }
+ }
+ }
+ else
+ {
+ DU_ALLOC_SHRABL_BUF(macPucchCfg->dlDataToUlAck, sizeof(PucchDlDataToUlAck));
+ }
+ if(macPucchCfg->dlDataToUlAck == NULLP)
+ {
+ DU_LOG("\nERROR --> F1AP : Failed to extract Dl_DataToUL_ACK in extractPucchCfg()");
+ return RFAILED;
+ }
+ memset(macPucchCfg->dlDataToUlAck, 0, sizeof(PucchDlDataToUlAck));
+ macPucchCfg->dlDataToUlAck->dlDataToUlAckListCount = cuPucchCfg->choice.setup->dl_DataToUL_ACK->list.count;
+ for(arrIdx = 0; arrIdx < macPucchCfg->dlDataToUlAck->dlDataToUlAckListCount; arrIdx++)
+ {
+ macPucchCfg->dlDataToUlAck->dlDataToUlAckList[arrIdx] =\
+ *cuPucchCfg->choice.setup->dl_DataToUL_ACK->list.array[arrIdx];
+ }
}
/* Power Control */
*
* Functionality: Fills ServingCellReconfig received by CU
*
- * @params[in] ServingCellConfig_t *cuSrvCellCfg
- * ServCellCfgInfo *macSrvCellCfg
+ * @params[in] ServingCellConfig_t *cuSrvCellCfg = Information which is send by
+ * CU, which we have stored in F1UeContextSetupDb,
+ * ServCellCfgInfo *macSrvCellCfg = Used to Store the information
+ * which needs to send in other layer, as well as this can be the
+ * variable which stores the information in DuCb,
+ * ServCellCfgInfo *storedSrvCellCfg = Null in case of sending the
+ * information to other layer else it will have ServCellCfgInfo which
+ * we have stored in copyOfmacUeCfg.
* @return ROK/RFAILD
*
* ****************************************************************/
-uint8_t extractSpCellDedicatedCfg(ServingCellConfig_t *cuSrvCellCfg, ServCellCfgInfo *macSrvCellCfg)
+uint8_t extractSpCellDedicatedCfg(ServingCellConfig_t *cuSrvCellCfg, ServCellCfgInfo *macSrvCellCfg,\
+ServCellCfgInfo *storedSrvCellCfg)
{
uint8_t ret = ROK;
BWP_DownlinkDedicated_t *dlBwp = NULLP;
if(dlBwp->pdcch_Config)
{
if(dlBwp->pdcch_Config->choice.setup)
- {
- macSrvCellCfg->initDlBwp.pdcchPresent = true;
- extractPdcchCfg(dlBwp->pdcch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdcchCfg);
- }
+ {
+ macSrvCellCfg->initDlBwp.pdcchPresent = true;
+ extractPdcchCfg(dlBwp->pdcch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdcchCfg);
+ }
}
if(dlBwp->pdsch_Config)
{
if(dlBwp->pdsch_Config->choice.setup)
- {
- macSrvCellCfg->initDlBwp.pdschPresent = true;
- extractPdschCfg(dlBwp->pdsch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdschCfg);
- }
+ {
+ macSrvCellCfg->initDlBwp.pdschPresent = true;
+
+ if(storedSrvCellCfg)
+ {
+ if(!storedSrvCellCfg->initDlBwp.pdschPresent)
+ {
+ extractPdschCfg(dlBwp->pdsch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdschCfg, NULL);
+ }
+ else
+ {
+ extractPdschCfg(dlBwp->pdsch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdschCfg,\
+ &storedSrvCellCfg->initDlBwp.pdschCfg);
+ }
+ }
+ else
+ {
+ extractPdschCfg(dlBwp->pdsch_Config->choice.setup, &macSrvCellCfg->initDlBwp.pdschCfg, NULL);
+ }
+ }
}
}
if(cuSrvCellCfg->firstActiveDownlinkBWP_Id)
{
macSrvCellCfg->bwpInactivityTmr = NULLP;
DU_ALLOC_SHRABL_BUF(macSrvCellCfg->bwpInactivityTmr, sizeof(uint8_t));
- if(macSrvCellCfg->bwpInactivityTmr)
- {
+ if(macSrvCellCfg->bwpInactivityTmr)
+ {
memcpy(macSrvCellCfg->bwpInactivityTmr, cuSrvCellCfg->bwp_InactivityTimer, sizeof(uint8_t));
- }
- else
- {
- DU_LOG("\nERROR --> F1AP : Memory Alloc failed for bwpInactivityTmr at extractSpCellDedicatedCfg()");
- return RFAILED;
- }
+ }
+ else
+ {
+ DU_LOG("\nERROR --> F1AP : Memory Alloc failed for bwpInactivityTmr at extractSpCellDedicatedCfg()");
+ return RFAILED;
+ }
}
}
if(cuSrvCellCfg->pdsch_ServingCellConfig)
{
ret = extractPdschServingCellCfg(cuSrvCellCfg->pdsch_ServingCellConfig->choice.setup, &macSrvCellCfg->pdschServCellCfg);
if(ret == RFAILED)
- {
- DU_LOG("\nERROR --> F1AP : Failed at extractPdschServingCellCfg()");
- return RFAILED;
- }
+ {
+ DU_LOG("\nERROR --> F1AP : Failed at extractPdschServingCellCfg()");
+ return RFAILED;
+ }
}
}
if(cuSrvCellCfg->uplinkConfig)
{
- if(cuSrvCellCfg->uplinkConfig->initialUplinkBWP)
- {
- ulBwp = ((BWP_UplinkDedicated_t *)(cuSrvCellCfg->uplinkConfig->initialUplinkBWP));
- if(ulBwp->pusch_Config)
- {
- macSrvCellCfg->initUlBwp.puschPresent = true;
- extractPuschCfg(ulBwp->pusch_Config, &macSrvCellCfg->initUlBwp.puschCfg);
- }
- if(ulBwp->pucch_Config)
- {
- macSrvCellCfg->initUlBwp.pucchPresent = true;
- memset(&macSrvCellCfg->initUlBwp.pucchCfg, 0, sizeof(PucchCfg));
- extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg);
- }
- }
- if(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id)
- macSrvCellCfg->firstActvUlBwpId = *(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id);
+ if(cuSrvCellCfg->uplinkConfig->initialUplinkBWP)
+ {
+ ulBwp = ((BWP_UplinkDedicated_t *)(cuSrvCellCfg->uplinkConfig->initialUplinkBWP));
+ if(ulBwp->pusch_Config)
+ {
+ macSrvCellCfg->initUlBwp.puschPresent = true;
+ extractPuschCfg(ulBwp->pusch_Config, &macSrvCellCfg->initUlBwp.puschCfg);
+ }
+ if(ulBwp->pucch_Config)
+ {
+ macSrvCellCfg->initUlBwp.pucchPresent = true;
+ memset(&macSrvCellCfg->initUlBwp.pucchCfg, 0, sizeof(PucchCfg));
+ if(storedSrvCellCfg)
+ {
+ if(!storedSrvCellCfg->initUlBwp.pucchPresent)
+ extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg, NULL);
+ else
+ extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg,\
+ &storedSrvCellCfg->initUlBwp.pucchCfg);
+ }
+ else
+ {
+ extractPucchCfg(ulBwp->pucch_Config, &macSrvCellCfg->initUlBwp.pucchCfg, NULL);
+ }
+ }
+ }
+ if(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id)
+ macSrvCellCfg->firstActvUlBwpId = *(cuSrvCellCfg->uplinkConfig->firstActiveUplinkBWP_Id);
}
return ret;
}
* Function : extractUeReCfgCellInfo
*
* Functionality: Fills Reconfig Cell group Info received by CU
+ *
+ * @params[in] CellGroupConfigRrc_t *cellGrp = CellGroupConfigRrc_t information which
+ * is send by CU, which we have stored in F1UeContextSetupDb
+ * MacUeCfg *MacUeCfg = Used to Store the information,
+ * which needs to send in other layer, as well as this can be
+ * the variable which stores the information in DuCb,
+ * MacUeCfg *storedMacUeCfg = Null in case of sending the
+ * information to other layer else it will have copyOfmacUeCfg
+ * which we have stored in F1UeContextSetupDb.
*
- * @params[in] CellGroupConfigRrc_t *macCellGrpCfg
- * MacUeCfg* macUeCfg
* @return ROK/RFAILED
*
* ****************************************************************/
-uint8_t extractUeReCfgCellInfo(CellGroupConfigRrc_t *cellGrp, MacUeCfg *macUeCfg)
+uint8_t extractUeReCfgCellInfo(CellGroupConfigRrc_t *cellGrp, MacUeCfg *macUeCfg, MacUeCfg *storedMacUeCfg)
{
uint8_t ret = ROK;
MAC_CellGroupConfig_t *macCellGroup = NULLP;
if(cellGrp->spCellConfig->spCellConfigDedicated)
{
servCellCfg = ((ServingCellConfig_t *)(cellGrp->spCellConfig->spCellConfigDedicated));
- ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg);
+ if(storedMacUeCfg)
+ {
+ if(!storedMacUeCfg->spCellCfgPres)
+ ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg, NULL);
+ else
+ ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg,\
+ &storedMacUeCfg->spCellCfg.servCellCfg);
+ }
+ else
+ {
+ ret = extractSpCellDedicatedCfg(servCellCfg, &macUeCfg->spCellCfg.servCellCfg, NULL);
+ }
if(ret == RFAILED)
{
DU_LOG("\nERROR --> F1AP : Failed at extractSpCellDedicatedCfg()");
*
* Functionality: builds Mac Cell Cfg
*
- * @params[in] MacUeCfg pointer
- * void pointer
+ * @params[in] MacUeCfg *macUeCfgToSend = Used to Store the information which
+ * needs to send in other layer, as well as this can be
+ * the variable which stores the information in DuCb.
+ * MacUeCfg *storedMacUeCfg = Null in case of sending the
+ * information to other layer else it will have copyOfmacUeCfg
+ * which we have stored in F1UeContextSetupDb
+ * void *cellInfo = CellGroupConfigRrc_t information which is send
+ * by CU, which we have stored in F1UeContextSetupDb
*
* @return void
*
* ****************************************************************/
-uint8_t procUeReCfgCellInfo(MacUeCfg *macUeCfgToSend, void *cellInfo)
+uint8_t procUeReCfgCellInfo(MacUeCfg *macUeCfgToSend,MacUeCfg *storedMacUeCfg, void *cellInfo)
{
uint8_t ret = ROK;
CellGroupConfigRrc_t *cellGrp = NULLP;
if(cellInfo)
{
cellGrp = (CellGroupConfigRrc_t *)cellInfo;
- ret = extractUeReCfgCellInfo(cellGrp, macUeCfgToSend);
+ ret = extractUeReCfgCellInfo(cellGrp, macUeCfgToSend, storedMacUeCfg);
if(ret == RFAILED)
DU_LOG("\nERROR --> F1AP : Failed at procUeReCfgCellInfo()");
}