From e19df2aedbb4e5e2a066e73d259a88942a291ac4 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Mon, 31 May 2021 17:19:51 +0100 Subject: [PATCH] Make sure that SRB configuration goes in RR config dedicated message. --- srsenb/src/enb_cfg_parser.cc | 2 +- srsenb/src/stack/rrc/ue_rr_cfg.cc | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index adec87116..01f3a4191 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -1730,7 +1730,7 @@ int parse_drb(all_args_t* args_, rrc_cfg_t* rrc_cfg_) parser::section srb1("srb1_config"); srb1.add_field(new field_srb(rrc_cfg_->srb1_cfg)); parser::section srb2("srb2_config"); - srb1.add_field(new field_srb(rrc_cfg_->srb2_cfg)); + srb2.add_field(new field_srb(rrc_cfg_->srb2_cfg)); parser::section qci("qci_config"); qci.add_field(new field_qci(rrc_cfg_->qci_cfg)); diff --git a/srsenb/src/stack/rrc/ue_rr_cfg.cc b/srsenb/src/stack/rrc/ue_rr_cfg.cc index ec93d917e..b280b5076 100644 --- a/srsenb/src/stack/rrc/ue_rr_cfg.cc +++ b/srsenb/src/stack/rrc/ue_rr_cfg.cc @@ -33,7 +33,7 @@ namespace srsenb { * SRBs / DRBs *****************************/ -srb_to_add_mod_s* add_srb(srb_to_add_mod_list_l& srbs, uint8_t srb_id) +srb_to_add_mod_s* add_srb(srb_to_add_mod_list_l& srbs, uint8_t srb_id, const asn1::rrc::rlc_cfg_c& srb_cfg) { if (srb_id > 2 or srb_id == 0) { srslog::fetch_basic_logger("RRC").error("Invalid SRB id=%d", srb_id); @@ -45,20 +45,20 @@ srb_to_add_mod_s* add_srb(srb_to_add_mod_list_l& srbs, uint8_t srb_id) srb_it->lc_ch_cfg_present = true; srb_it->lc_ch_cfg.set(srb_to_add_mod_s::lc_ch_cfg_c_::types_opts::default_value); srb_it->rlc_cfg_present = true; - srb_it->rlc_cfg.set(srb_to_add_mod_s::rlc_cfg_c_::types_opts::default_value); - + srb_it->rlc_cfg.set(srb_to_add_mod_s::rlc_cfg_c_::types_opts::explicit_value); + srb_it->rlc_cfg.explicit_value() = srb_cfg; return srb_it; } -void fill_srbs_reconf(srb_to_add_mod_list_l& srbs, const srb_to_add_mod_list_l& current_srbs) +void fill_srbs_reconf(srb_to_add_mod_list_l& srbs, const srb_to_add_mod_list_l& current_srbs, const rrc_cfg_t& enb_cfg) { // NOTE: In case of Handover, the Reconf includes SRB1 if (srsran::find_rrc_obj_id(current_srbs, 1) == current_srbs.end()) { - add_srb(srbs, 1); + add_srb(srbs, 1, enb_cfg.srb1_cfg); } if (srsran::find_rrc_obj_id(current_srbs, 2) == current_srbs.end()) { - add_srb(srbs, 2); + add_srb(srbs, 2, enb_cfg.srb2_cfg); } } @@ -299,7 +299,7 @@ void fill_rr_cfg_ded_setup(asn1::rrc::rr_cfg_ded_s& rr_cfg, // (Re)establish SRB1 rr_cfg.srb_to_add_mod_list_present = true; - add_srb(rr_cfg.srb_to_add_mod_list, 1); + add_srb(rr_cfg.srb_to_add_mod_list, 1, enb_cfg.srb1_cfg); // Setup SR/CQI configs rr_cfg.phys_cfg_ded_present = true; @@ -315,7 +315,7 @@ void fill_rr_cfg_ded_reconf(asn1::rrc::rr_cfg_ded_s& rr_cfg, bool phy_cfg_updated) { // (Re)establish SRBs - fill_srbs_reconf(rr_cfg.srb_to_add_mod_list, current_rr_cfg.srb_to_add_mod_list); + fill_srbs_reconf(rr_cfg.srb_to_add_mod_list, current_rr_cfg.srb_to_add_mod_list, enb_cfg); rr_cfg.srb_to_add_mod_list_present = rr_cfg.srb_to_add_mod_list.size() > 0; // Update DRBs if required