diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 8ce2e3f116..b6b16be38a 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -870,6 +870,8 @@ int main(int argc, char **argv) nr_rrc_mac_config_req_mib(0, 0, mib->message.choice.mib, false); nr_rrc_mac_config_req_cg(0, 0, UE_CellGroup); + asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, UE_CellGroup); + UE_mac->state = UE_CONNECTED; UE_mac->ra.ra_state = RA_SUCCEEDED; diff --git a/openair2/LAYER2/NR_MAC_UE/config_ue.c b/openair2/LAYER2/NR_MAC_UE/config_ue.c index 53d7689b62..519ad1c597 100644 --- a/openair2/LAYER2/NR_MAC_UE/config_ue.c +++ b/openair2/LAYER2/NR_MAC_UE/config_ue.c @@ -1967,6 +1967,4 @@ void nr_rrc_mac_config_req_cg(module_id_t module_id, if (!mac->dl_config_request || !mac->ul_config_request) ue_init_config_request(mac, mac->current_DL_BWP->scs); - - asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cell_group_config); } diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index d775931bdd..0cb40e1ac1 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -216,8 +216,10 @@ static void nr_rrc_ue_process_rrcReconfiguration(NR_UE_RRC_INST_t *rrc, nr_rrc_cellgroup_configuration(rrcNB, rrc, cellGroupConfig); - if (!get_softmodem_params()->sa) - nr_rrc_mac_config_req_cg(0, 0, cellGroupConfig); + AssertFatal(!get_softmodem_params()->sa, "secondaryCellGroup only used in NSA for now\n"); + nr_rrc_mac_config_req_cg(rrc->ue_id, 0, cellGroupConfig); + + asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cellGroupConfig); } if (ie->measConfig != NULL) { LOG_I(NR_RRC, "Measurement Configuration is present\n"); @@ -821,6 +823,8 @@ static void nr_rrc_ue_process_masterCellGroup(NR_UE_RRC_INST_t *rrc, LOG_D(RRC,"Sending CellGroupConfig to MAC\n"); nr_rrc_mac_config_req_cg(rrc->ue_id, 0, cellGroupConfig); + + asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, cellGroupConfig); } static void rrc_ue_generate_RRCSetupComplete(const NR_UE_RRC_INST_t *rrc, const uint8_t Transaction_id)