diff --git a/srsgnb/src/stack/rrc/rrc_nr_ue.cc b/srsgnb/src/stack/rrc/rrc_nr_ue.cc index 54f9e819f..09eec7bca 100644 --- a/srsgnb/src/stack/rrc/rrc_nr_ue.cc +++ b/srsgnb/src/stack/rrc/rrc_nr_ue.cc @@ -939,12 +939,14 @@ void rrc_nr::ue::send_connection_reest(uint8_t ncc) // set NCC reest.next_hop_chaining_count = ncc; - // add PDCP bearers - update_pdcp_bearers(next_radio_bearer_cfg, next_cell_group_cfg); - // add RLC bearers update_rlc_bearers(next_cell_group_cfg); + // add PDCP bearers + // this is done after updating the RLC bearers, + // so the PDCP can query the RLC mode + update_pdcp_bearers(next_radio_bearer_cfg, next_cell_group_cfg); + // add MAC bearers update_mac(next_cell_group_cfg, false); @@ -1010,12 +1012,14 @@ void rrc_nr::ue::send_rrc_setup() logger.debug("Containerized MasterCellGroup: %s", js.to_string().c_str()); } - // add PDCP bearers - update_pdcp_bearers(setup_ies.radio_bearer_cfg, next_cell_group_cfg); - // add RLC bearers update_rlc_bearers(next_cell_group_cfg); + // add PDCP bearers + // this is done after updating the RLC bearers, + // so the PDCP can query the RLC mode + update_pdcp_bearers(next_radio_bearer_cfg, next_cell_group_cfg); + // add MAC bearers update_mac(next_cell_group_cfg, false); @@ -1162,6 +1166,8 @@ void rrc_nr::ue::send_rrc_reconfiguration() update_rlc_bearers(master_cell_group); // add PDCP bearers + // this is done after updating the RLC bearers, + // so the PDCP can query the RLC mode update_pdcp_bearers(ies.radio_bearer_cfg, master_cell_group); } diff --git a/srsue/src/stack/rrc_nr/rrc_nr_procedures.cc b/srsue/src/stack/rrc_nr/rrc_nr_procedures.cc index 5bd11d332..006baf770 100644 --- a/srsue/src/stack/rrc_nr/rrc_nr_procedures.cc +++ b/srsue/src/stack/rrc_nr/rrc_nr_procedures.cc @@ -324,13 +324,13 @@ srsran::proc_outcome_t rrc_nr::connection_setup_proc::init(const asn1::rrc_nr::r // Stop T300 rrc_handle.t300.stop(); - // Apply the Radio Bearer configuration - if (!rrc_handle.apply_radio_bearer_cfg(radio_bearer_cfg_)) { + // Apply the Cell Group configuration + if (!rrc_handle.update_cell_group_cfg(cell_group_)) { return proc_outcome_t::error; } - // Apply the Cell Group configuration - if (!rrc_handle.update_cell_group_cfg(cell_group_)) { + // Apply the Radio Bearer configuration + if (!rrc_handle.apply_radio_bearer_cfg(radio_bearer_cfg_)) { return proc_outcome_t::error; }