Commit dfc53049 authored by francescomani's avatar francescomani

passing UECAP structure to RRC reconfiguration functions

parent ae29f644
...@@ -762,7 +762,8 @@ int main(int argc, char **argv) ...@@ -762,7 +762,8 @@ int main(int argc, char **argv)
prepare_scd(scd); prepare_scd(scd);
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 6, 0, 0, 0); // TODO do a UECAP for phy-sim
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, n_tx, 6, 0, 0, 0);
/* RRC parameter validation for secondaryCellGroup */ /* RRC parameter validation for secondaryCellGroup */
fix_scd(scd); fix_scd(scd);
......
...@@ -713,7 +713,8 @@ int main(int argc, char **argv) ...@@ -713,7 +713,8 @@ int main(int argc, char **argv)
prepare_scd(scd); prepare_scd(scd);
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, 0, 1, n_tx, 0, 0, 0, 0); // TODO do a UECAP for phy-sim
fill_default_secondaryCellGroup(scc, scd, secondaryCellGroup, NULL, 0, 1, n_tx, 0, 0, 0, 0);
// xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup); // xer_fprint(stdout, &asn_DEF_NR_CellGroupConfig, (const void*)secondaryCellGroup);
......
...@@ -1407,6 +1407,13 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr ...@@ -1407,6 +1407,13 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
ASN_SEQUENCE_ADD(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig_drb); ASN_SEQUENCE_ADD(&ue_context_mastercellGroup->rlc_BearerToAddModList->list, rlc_BearerConfig_drb);
} }
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
rrc_gNB_carrier_data_t *carrier,
NR_UE_NR_Capability_t *uecap) {
}
void fill_initial_cellGroupConfig(rnti_t rnti, void fill_initial_cellGroupConfig(rnti_t rnti,
NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *cellGroupConfig,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
...@@ -1824,6 +1831,8 @@ int16_t do_RRCReconfiguration( ...@@ -1824,6 +1831,8 @@ int16_t do_RRCReconfiguration(
NR_SDAP_Config_t *sdap_config, NR_SDAP_Config_t *sdap_config,
NR_MeasConfig_t *meas_config, NR_MeasConfig_t *meas_config,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList, struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
rrc_gNB_ue_context_t *const ue_context_pP,
rrc_gNB_carrier_data_t *carrier,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig) NR_CellGroupConfig_t *cellGroupConfig)
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -1860,15 +1869,6 @@ int16_t do_RRCReconfiguration( ...@@ -1860,15 +1869,6 @@ int16_t do_RRCReconfiguration(
ie->radioBearerConfig->srb3_ToRelease = NULL; ie->radioBearerConfig->srb3_ToRelease = NULL;
ie->radioBearerConfig->drb_ToReleaseList = DRB_releaseList; ie->radioBearerConfig->drb_ToReleaseList = DRB_releaseList;
} }
/******************** Secondary Cell Group ********************/
// rrc_gNB_carrier_data_t *carrier = &(gnb_rrc_inst->carrier);
// fill_default_secondaryCellGroup( carrier->servingcellconfigcommon,
// ue_context_pP->ue_context.secondaryCellGroup,
// 1,
// 1,
// carrier->pdsch_AntennaPorts,
// carrier->initial_csi_index[ue_context_p->local_uid + 1],
// ue_context_pP->local_uid);
/******************** Meas Config ********************/ /******************** Meas Config ********************/
// measConfig // measConfig
...@@ -1884,6 +1884,9 @@ int16_t do_RRCReconfiguration( ...@@ -1884,6 +1884,9 @@ int16_t do_RRCReconfiguration(
} }
if(cellGroupConfig!=NULL){ if(cellGroupConfig!=NULL){
update_cellGroupConfig(cellGroupConfig,
carrier,
ue_context_pP->ue_context.UE_Capability_nr);
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig, enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
NULL, NULL,
(void *)cellGroupConfig, (void *)cellGroupConfig,
......
...@@ -99,6 +99,10 @@ void fill_initial_cellGroupConfig(rnti_t rnti, ...@@ -99,6 +99,10 @@ void fill_initial_cellGroupConfig(rnti_t rnti,
NR_ServingCellConfigCommon_t *scc, NR_ServingCellConfigCommon_t *scc,
rrc_gNB_carrier_data_t *carrier); rrc_gNB_carrier_data_t *carrier);
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
rrc_gNB_carrier_data_t *carrier,
NR_UE_NR_Capability_t *uecap);
void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup); void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGroupConfig_t *ue_context_mastercellGroup);
uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP, uint8_t do_RRCSetup(rrc_gNB_ue_context_t *const ue_context_pP,
...@@ -133,6 +137,8 @@ int16_t do_RRCReconfiguration( ...@@ -133,6 +137,8 @@ int16_t do_RRCReconfiguration(
NR_SDAP_Config_t *sdap_config, NR_SDAP_Config_t *sdap_config,
NR_MeasConfig_t *meas_config, NR_MeasConfig_t *meas_config,
struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList, struct NR_RRCReconfiguration_v1530_IEs__dedicatedNAS_MessageList *dedicatedNAS_MessageList,
rrc_gNB_ue_context_t *const ue_context_pP,
rrc_gNB_carrier_data_t *carrier,
NR_MAC_CellGroupConfig_t *mac_CellGroupConfig, NR_MAC_CellGroupConfig_t *mac_CellGroupConfig,
NR_CellGroupConfig_t *cellGroupConfig); NR_CellGroupConfig_t *cellGroupConfig);
......
...@@ -76,6 +76,7 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti); ...@@ -76,6 +76,7 @@ void rrc_remove_nsa_user(gNB_RRC_INST *rrc, int rnti);
void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellconfigcommon, void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
NR_ServingCellConfig_t *servingcellconfigdedicated, NR_ServingCellConfig_t *servingcellconfigdedicated,
NR_CellGroupConfig_t *secondaryCellGroup, NR_CellGroupConfig_t *secondaryCellGroup,
NR_UE_NR_Capability_t *uecap,
int scg_id, int scg_id,
int servCellIndex, int servCellIndex,
int dl_antenna_ports, int dl_antenna_ports,
...@@ -90,6 +91,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon ...@@ -90,6 +91,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
NR_ServingCellConfig_t *servingcellconfigdedicated, NR_ServingCellConfig_t *servingcellconfigdedicated,
NR_RRCReconfiguration_IEs_t *reconfig, NR_RRCReconfiguration_IEs_t *reconfig,
NR_CellGroupConfig_t *secondaryCellGroup, NR_CellGroupConfig_t *secondaryCellGroup,
NR_UE_NR_Capability_t *uecap,
int dl_antenna_ports, int dl_antenna_ports,
int minRXTXTIMEpdsch, int minRXTXTIMEpdsch,
int do_csirs, int do_csirs,
......
...@@ -777,6 +777,8 @@ rrc_gNB_generate_defaultRRCReconfiguration( ...@@ -777,6 +777,8 @@ rrc_gNB_generate_defaultRRCReconfiguration(
NULL, NULL,
dedicatedNAS_MessageList, dedicatedNAS_MessageList,
NULL, NULL,
NULL,
NULL,
NULL); NULL);
free(ue_context_pP->ue_context.nas_pdu.buffer); free(ue_context_pP->ue_context.nas_pdu.buffer);
...@@ -1046,6 +1048,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration( ...@@ -1046,6 +1048,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration(
NULL, NULL,
NULL, NULL,
dedicatedNAS_MessageList, dedicatedNAS_MessageList,
ue_context_pP,
&rrc->carrier,
NULL, NULL,
cellGroupConfig); cellGroupConfig);
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n"); LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,"[MSG] RRC Reconfiguration\n");
...@@ -1155,6 +1159,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release( ...@@ -1155,6 +1159,8 @@ rrc_gNB_generate_dedicatedRRCReconfiguration_release(
NULL, NULL,
dedicatedNAS_MessageList, dedicatedNAS_MessageList,
NULL, NULL,
NULL,
NULL,
NULL); NULL);
ue_context_pP->ue_context.pdu_session_release_command_flag = 1; ue_context_pP->ue_context.pdu_session_release_command_flag = 1;
...@@ -1680,6 +1686,8 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete( ...@@ -1680,6 +1686,8 @@ rrc_gNB_process_RRCConnectionReestablishmentComplete(
NULL, // MeasObj_list, NULL, // MeasObj_list,
NULL, NULL,
NULL, NULL,
NULL,
NULL,
NULL); NULL);
LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size, LOG_DUMPMSG(NR_RRC,DEBUG_RRC,(char *)buffer,size,
"[MSG] RRC Reconfiguration\n"); "[MSG] RRC Reconfiguration\n");
......
...@@ -262,6 +262,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ...@@ -262,6 +262,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
ue_context_p->ue_context.spCellConfig->spCellConfigDedicated, ue_context_p->ue_context.spCellConfig->spCellConfigDedicated,
reconfig_ies, reconfig_ies,
ue_context_p->ue_context.secondaryCellGroup, ue_context_p->ue_context.secondaryCellGroup,
ue_context_p->ue_context.UE_Capability_nr,
carrier->pdsch_AntennaPorts, carrier->pdsch_AntennaPorts,
carrier->minRXTXTIME, carrier->minRXTXTIME,
carrier->do_CSIRS, carrier->do_CSIRS,
...@@ -272,6 +273,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_ ...@@ -272,6 +273,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
NULL, NULL,
reconfig_ies, reconfig_ies,
ue_context_p->ue_context.secondaryCellGroup, ue_context_p->ue_context.secondaryCellGroup,
ue_context_p->ue_context.UE_Capability_nr,
carrier->pdsch_AntennaPorts, carrier->pdsch_AntennaPorts,
carrier->minRXTXTIME, carrier->minRXTXTIME,
carrier->do_CSIRS, carrier->do_CSIRS,
......
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellconfigcommon, void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellconfigcommon,
NR_ServingCellConfig_t *servingcellconfigdedicated, NR_ServingCellConfig_t *servingcellconfigdedicated,
NR_CellGroupConfig_t *secondaryCellGroup, NR_CellGroupConfig_t *secondaryCellGroup,
NR_UE_NR_Capability_t *uecap,
int scg_id, int scg_id,
int servCellIndex, int servCellIndex,
int dl_antenna_ports, int dl_antenna_ports,
...@@ -1333,6 +1334,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon ...@@ -1333,6 +1334,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
NR_ServingCellConfig_t *servingcellconfigdedicated, NR_ServingCellConfig_t *servingcellconfigdedicated,
NR_RRCReconfiguration_IEs_t *reconfig, NR_RRCReconfiguration_IEs_t *reconfig,
NR_CellGroupConfig_t *secondaryCellGroup, NR_CellGroupConfig_t *secondaryCellGroup,
NR_UE_NR_Capability_t *uecap,
int dl_antenna_ports, int dl_antenna_ports,
int minRXTXTIME, int minRXTXTIME,
int do_csirs, int do_csirs,
...@@ -1347,6 +1349,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon ...@@ -1347,6 +1349,7 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
fill_default_secondaryCellGroup(servingcellconfigcommon, fill_default_secondaryCellGroup(servingcellconfigcommon,
servingcellconfigdedicated, servingcellconfigdedicated,
secondaryCellGroup, secondaryCellGroup,
uecap,
1, 1,
1, 1,
dl_antenna_ports, dl_antenna_ports,
......
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