Commit 037e37ea authored by ChenWeiTai's avatar ChenWeiTai

do_SERVINGCELLCONFIGCOMMON will be reuse for fill common config

parent 02a602fa
......@@ -405,7 +405,6 @@ typedef struct NRRrcConfigurationReq_s {
long PDCCH_TCI_StateId[MAX_NUM_CCs];
BOOLEAN_t tci_PresentInDCI[MAX_NUM_CCs];
uint32_t PDCCH_DMRS_ScramblingID[MAX_NUM_CCs];
uint8_t frequencyDomainResources_buf[6];
//NR PDCCH-ConfigCommon commonSearchSpaces
long SearchSpaceId[MAX_NUM_CCs];
......
This diff is collapsed.
......@@ -80,10 +80,11 @@ uint8_t do_MIB_NR(rrc_gNB_carrier_data_t *carrier,
uint8_t do_SIB1_NR(rrc_gNB_carrier_data_t *carrier,int Mod_id,int CC_id, gNB_RrcConfigurationReq *configuration);
void do_SERVINGCELLCONFIGCOMMON(uint8_t Mod_id,
int CC_id
int CC_id,
#if defined(ENABLE_ITTI)
,gNB_RrcConfigurationReq *configuration
gNB_RrcConfigurationReq *configuration,
#endif
int initial_flag
);
......
......@@ -81,18 +81,152 @@ int rrc_init_nr_global_param(void){
}
//-----------------------------------------------------------------------------
void
rrc_config_nr_buffer(
NR_SRB_INFO* Srb_info,
uint8_t Lchan_type,
uint8_t Role
)
//-----------------------------------------------------------------------------
{
void rrc_config_nr_buffer(NR_SRB_INFO* Srb_info,
uint8_t Lchan_type,
uint8_t Role
){
Srb_info->Rx_buffer.payload_size = 0;
Srb_info->Tx_buffer.payload_size = 0;
}
//-----------------------------------------------------------------------------
void rrc_config_servingcellconfigcommon(uint8_t Mod_id,
int CC_id
#if defined(ENABLE_ITTI)
,gNB_RrcConfigurationReq *common_configuration
#endif
){
common_configuration->MIB_subCarrierSpacingCommon[CC_id] = 0;
common_configuration->MIB_ssb_SubcarrierOffset[CC_id] = 0;
common_configuration->MIB_dmrs_TypeA_Position[CC_id] = 0;
common_configuration->pdcch_ConfigSIB1[CC_id] = 0;
common_configuration->absoluteFrequencySSB[CC_id] = 0;
common_configuration->DL_FreqBandIndicatorNR[CC_id] = 0;
common_configuration->DL_absoluteFrequencyPointA[CC_id] = 0;
common_configuration->DL_offsetToCarrier[CC_id] = 0;
common_configuration->DL_SCS_SubcarrierSpacing[CC_id] = 0;
common_configuration->DL_carrierBandwidth[CC_id] = 0;
common_configuration->DL_locationAndBandwidth[CC_id] = 0;
common_configuration->DL_BWP_SubcarrierSpacing[CC_id] = 0;
common_configuration->DL_BWP_prefix_type[CC_id] = 0;
common_configuration->UL_FreqBandIndicatorNR[CC_id] = 0;
common_configuration->UL_absoluteFrequencyPointA[CC_id] = 0;
common_configuration->UL_additionalSpectrumEmission[CC_id] = 0;
common_configuration->UL_p_Max[CC_id] = 0;
common_configuration->UL_frequencyShift7p5khz[CC_id] = 0;
common_configuration->UL_offsetToCarrier[CC_id] = 0;
common_configuration->UL_SCS_SubcarrierSpacing[CC_id] = 0;
common_configuration->UL_carrierBandwidth[CC_id] = 0;
common_configuration->UL_locationAndBandwidth[CC_id] = 0;
common_configuration->UL_BWP_SubcarrierSpacing[CC_id] = 0;
common_configuration->UL_BWP_prefix_type[CC_id] = 0;
common_configuration->UL_timeAlignmentTimerCommon[CC_id] = 0;
common_configuration->ServingCellConfigCommon_ssb_PositionsInBurst_PR[CC_id] = 0;
common_configuration->ServingCellConfigCommon_ssb_periodicityServingCell[CC_id] = 0;
common_configuration->ServingCellConfigCommon_dmrs_TypeA_Position[CC_id] = 0;
common_configuration->NIA_SubcarrierSpacing[CC_id] = 0;
common_configuration->ServingCellConfigCommon_ss_PBCH_BlockPower[CC_id] = 0;
common_configuration->referenceSubcarrierSpacing[CC_id] = 0;
common_configuration->dl_UL_TransmissionPeriodicity[CC_id] = 0;
common_configuration->nrofDownlinkSlots[CC_id] = 0;
common_configuration->nrofDownlinkSymbols[CC_id] = 0;
common_configuration->nrofUplinkSlots[CC_id] = 0;
common_configuration->nrofUplinkSymbols[CC_id] = 0;
common_configuration->rach_totalNumberOfRA_Preambles[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_choice[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneEighth[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneFourth[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_oneHalf[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_one[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_two[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_four[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_eight[CC_id] = 0;
common_configuration->rach_ssb_perRACH_OccasionAndCB_PreamblesPerSSB_sixteen[CC_id] = 0;
common_configuration->rach_groupBconfigured[CC_id] = 0;
common_configuration->rach_ra_Msg3SizeGroupA[CC_id] = 0;
common_configuration->rach_messagePowerOffsetGroupB[CC_id] = 0;
common_configuration->rach_numberOfRA_PreamblesGroupA[CC_id] = 0;
common_configuration->rach_ra_ContentionResolutionTimer[CC_id] = 0;
common_configuration->rsrp_ThresholdSSB[CC_id] = 0;
common_configuration->rsrp_ThresholdSSB_SUL[CC_id] = 0;
common_configuration->prach_RootSequenceIndex_choice[CC_id] = 0;
common_configuration->prach_RootSequenceIndex_l839[CC_id] = 0;
common_configuration->prach_RootSequenceIndex_l139[CC_id] = 0;
common_configuration->prach_msg1_SubcarrierSpacing[CC_id] = 0;
common_configuration->restrictedSetConfig[CC_id] = 0;
common_configuration->msg3_transformPrecoding[CC_id] = 0;
common_configuration->prach_ConfigurationIndex[CC_id] = 0;
common_configuration->prach_msg1_FDM[CC_id] = 0;
common_configuration->prach_msg1_FrequencyStart[CC_id] = 0;
common_configuration->zeroCorrelationZoneConfig[CC_id] = 0;
common_configuration->preambleReceivedTargetPower[CC_id] = 0;
common_configuration->preambleTransMax[CC_id] = 0;
common_configuration->powerRampingStep[CC_id] = 0;
common_configuration->ra_ResponseWindow[CC_id] = 0;
common_configuration->groupHoppingEnabledTransformPrecoding[CC_id] = 0;
common_configuration->msg3_DeltaPreamble[CC_id] = 0;
common_configuration->p0_NominalWithGrant[CC_id] = 0;
common_configuration->PUSCH_TimeDomainResourceAllocation_k2[CC_id] = 0;
common_configuration->PUSCH_TimeDomainResourceAllocation_mappingType[CC_id] = 0;
common_configuration->PUSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id] = 0;
common_configuration->pucch_ResourceCommon[CC_id] = 0;
common_configuration->pucch_GroupHopping[CC_id] = 0;
common_configuration->hoppingId[CC_id] = 0;
common_configuration->p0_nominal[CC_id] = 0;
common_configuration->PDSCH_TimeDomainResourceAllocation_k0[CC_id] = 0;
common_configuration->PDSCH_TimeDomainResourceAllocation_mappingType[CC_id] = 0;
common_configuration->PDSCH_TimeDomainResourceAllocation_startSymbolAndLength[CC_id] = 0;
common_configuration->rateMatchPatternId[CC_id] = 0;
common_configuration->RateMatchPattern_patternType[CC_id] = 0;
common_configuration->symbolsInResourceBlock[CC_id] = 0;
common_configuration->periodicityAndPattern[CC_id] = 0;
common_configuration->RateMatchPattern_controlResourceSet[CC_id] = 0;
common_configuration->RateMatchPattern_subcarrierSpacing[CC_id] = 0;
common_configuration->RateMatchPattern_mode[CC_id] = 0;
common_configuration->controlResourceSetZero[CC_id] = 0;
common_configuration->searchSpaceZero[CC_id] = 0;
common_configuration->searchSpaceSIB1[CC_id] = 0;
common_configuration->searchSpaceOtherSystemInformation[CC_id] = 0;
common_configuration->pagingSearchSpace[CC_id] = 0;
common_configuration->ra_SearchSpace[CC_id] = 0;
common_configuration->PDCCH_common_controlResourceSetId[CC_id] = 0;
common_configuration->PDCCH_common_ControlResourceSet_duration[CC_id] = 0;
common_configuration->PDCCH_cce_REG_MappingType[CC_id] = 0;
common_configuration->PDCCH_reg_BundleSize[CC_id] = 0;
common_configuration->PDCCH_interleaverSize[CC_id] = 0;
common_configuration->PDCCH_shiftIndex[CC_id] = 0;
common_configuration->PDCCH_precoderGranularity[CC_id] = 0;
common_configuration->PDCCH_TCI_StateId[CC_id] = 0;
common_configuration->tci_PresentInDCI[CC_id] = 0;
common_configuration->PDCCH_DMRS_ScramblingID[CC_id] = 0;
common_configuration->SearchSpaceId[CC_id] = 0;
common_configuration->commonSearchSpaces_controlResourceSetId[CC_id] = 0;
common_configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_choice[CC_id] = 0;
common_configuration->SearchSpace_monitoringSlotPeriodicityAndOffset_value[CC_id] = 0;
common_configuration->SearchSpace_duration[CC_id] = 0;
common_configuration->SearchSpace_nrofCandidates_aggregationLevel1[CC_id] = 0;
common_configuration->SearchSpace_nrofCandidates_aggregationLevel2[CC_id] = 0;
common_configuration->SearchSpace_nrofCandidates_aggregationLevel4[CC_id] = 0;
common_configuration->SearchSpace_nrofCandidates_aggregationLevel8[CC_id] = 0;
common_configuration->SearchSpace_nrofCandidates_aggregationLevel16[CC_id] = 0;
common_configuration->SearchSpace_searchSpaceType[CC_id] = 0;
common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel1[CC_id] = 0;
common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel2[CC_id] = 0;
common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel4[CC_id] = 0;
common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel8[CC_id] = 0;
common_configuration->Common_dci_Format2_0_nrofCandidates_SFI_aggregationLevel16[CC_id] = 0;
common_configuration->Common_dci_Format2_3_monitoringPeriodicity[CC_id] = 0;
common_configuration->Common_dci_Format2_3_nrofPDCCH_Candidates[CC_id] = 0;
common_configuration->ue_Specific__dci_Formats[CC_id] = 0;
common_configuration->RateMatchPatternLTE_CRS_carrierFreqDL[CC_id] = 0;
common_configuration->RateMatchPatternLTE_CRS_carrierBandwidthDL[CC_id] = 0;
common_configuration->RateMatchPatternLTE_CRS_nrofCRS_Ports[CC_id] = 0;
common_configuration->RateMatchPatternLTE_CRS_v_Shift[CC_id] = 0;
common_configuration->RateMatchPatternLTE_CRS_radioframeAllocationPeriod[CC_id] = 0;
common_configuration->RateMatchPatternLTE_CRS_radioframeAllocationOffset[CC_id] = 0;
common_configuration->RateMatchPatternLTE_CRS_subframeAllocation_choice[CC_id] = 0;
//-----------------------------------------------------------------------------
\ No newline at end of file
}
\ No newline at end of file
......@@ -338,6 +338,16 @@ typedef struct gNB_RRC_UE_s {
uint32_t ue_reestablishment_timer;
uint32_t ue_reestablishment_timer_thres;
uint8_t e_rab_release_command_flag;
//------------------------------------------------------------------------------//
NR_CellGroupId_t cellGroupId;
struct NR_SpCellConfig *spCellConfig;
struct NR_CellGroupConfig__sCellToAddModList *sCellconfig;
struct NR_CellGroupConfig__sCellToReleaseList *sCellconfigRelease;
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_BearerBonfig;
struct NR_CellGroupConfig__rlc_BearerToReleaseList *rlc_BearerRelease;
struct NR_MAC_CellGroupConfig *mac_CellGroupConfig;
struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig;
} gNB_RRC_UE_t;
typedef uid_t ue_uid_t;
......
......@@ -58,6 +58,13 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
rrc_gNB_ue_context_t *const ue_context_pP
);
void rrc_config_servingcellconfigcommon(uint8_t Mod_id,
int CC_id
#if defined(ENABLE_ITTI)
,gNB_RrcConfigurationReq *common_configuration
#endif
);
#if defined(ENABLE_ITTI)
/**\brief RRC eNB task.
\param void *args_p Pointer on arguments to start the task. */
......
......@@ -144,6 +144,40 @@ void rrc_gNB_generate_SgNBAdditionRequestAcknowledge(
rrc_gNB_ue_context_t *const ue_context_pP
){
uint8_t size;
uint8_t buffer[100];
int CC_id = ue_context_pP->ue_context.primaryCC_id;
/*
NR_CellGroupId_t cellGroupId;
struct NR_CellGroupConfig__rlc_BearerToAddModList *rlc_BearerToAddModList;
struct NR_MAC_CellGroupConfig *mac_CellGroupConfig;
struct NR_PhysicalCellGroupConfig *physicalCellGroupConfig;
struct NR_SpCellConfig *spCellConfig;
struct NR_CellGroupConfig__sCellToAddModList *sCellToAddModList;
*/
gNB_RrcConfigurationReq *common_configuration;
common_configuration = CALLOC(1,sizeof(gNB_RrcConfigurationReq));
//Fill config
rrc_config_servingcellconfigcommon(ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id
#if defined(ENABLE_ITTI)
,common_configuration
#endif
);
//Fill config to structure
do_SERVINGCELLCONFIGCOMMON(ctxt_pP->module_id,
ue_context_pP->ue_context.primaryCC_id,
#if defined(ENABLE_ITTI)
common_configuration,
#endif
0
);
/*
memcpy( (*spCellConfig)->reconfigurationWithSync->spCellConfigCommon ,
RC.nrrrc[ctxt_pP->module_id]->carrier[0].servingcellconfigcommon,
sizeof(struct NR_ServingCellConfigCommon));
*/
}
......@@ -184,10 +218,11 @@ static void init_NR_SI(const protocol_ctxt_t* const ctxt_pP,
);
do_SERVINGCELLCONFIGCOMMON(ctxt_pP->module_id,
CC_id
CC_id,
#if defined(ENABLE_ITTI)
,configuration
configuration,
#endif
1
);
LOG_I(NR_RRC,"Done init_NR_SI\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment