From 88212ed3e08eb8159f48db10f4d4e061d2c54f50 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 24 Sep 2021 14:56:59 +0200 Subject: [PATCH] fix NR sched configuration of UE generated in RRC --- srsenb/src/stack/gnb_stack_nr.cc | 2 -- srsenb/src/stack/mac/nr/mac_nr.cc | 2 -- srsenb/src/stack/rrc/rrc_nr.cc | 5 +---- srsenb/test/mac/nr/sched_nr_cfg_generators.h | 4 ++++ 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/srsenb/src/stack/gnb_stack_nr.cc b/srsenb/src/stack/gnb_stack_nr.cc index bef8ec076..d3a1fd776 100644 --- a/srsenb/src/stack/gnb_stack_nr.cc +++ b/srsenb/src/stack/gnb_stack_nr.cc @@ -70,8 +70,6 @@ int gnb_stack_nr::init(const srsenb::stack_args_t& args_, // Init all layers mac_nr_args_t mac_args = {}; - mac_args.fixed_dl_mcs = 28; - mac_args.fixed_ul_mcs = 10; mac_args.pcap = args.mac_pcap; mac_args.pcap.filename = "/tmp/enb_mac_nr.pcap"; if (mac.init(mac_args, phy, nullptr, &rlc, &rrc) != SRSRAN_SUCCESS) { diff --git a/srsenb/src/stack/mac/nr/mac_nr.cc b/srsenb/src/stack/mac/nr/mac_nr.cc index c8eff7765..01acff678 100644 --- a/srsenb/src/stack/mac/nr/mac_nr.cc +++ b/srsenb/src/stack/mac/nr/mac_nr.cc @@ -139,8 +139,6 @@ uint16_t mac_nr::reserve_rnti(uint32_t enb_cc_idx) // Add new user to the scheduler so that it can RX/TX SRB0 srsenb::sched_nr_interface::ue_cfg_t ue_cfg = srsenb::get_default_ue_cfg(1); - ue_cfg.fixed_dl_mcs = args.fixed_dl_mcs; - ue_cfg.fixed_ul_mcs = args.fixed_ul_mcs; sched.ue_cfg(rnti, ue_cfg); return rnti; diff --git a/srsenb/src/stack/rrc/rrc_nr.cc b/srsenb/src/stack/rrc/rrc_nr.cc index e0d667636..305f1d34b 100644 --- a/srsenb/src/stack/rrc/rrc_nr.cc +++ b/srsenb/src/stack/rrc/rrc_nr.cc @@ -470,10 +470,7 @@ int rrc_nr::sgnb_reconfiguration_complete(uint16_t eutra_rnti, asn1::dyn_octstri Every function in UE class is called from a mutex environment thus does not need extra protection. *******************************************************************************/ -rrc_nr::ue::ue(rrc_nr* parent_, uint16_t rnti_) : parent(parent_), rnti(rnti_) -{ - uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH; -} +rrc_nr::ue::ue(rrc_nr* parent_, uint16_t rnti_) : parent(parent_), rnti(rnti_), uecfg(srsenb::get_default_ue_cfg(1)) {} void rrc_nr::ue::send_connection_setup() { diff --git a/srsenb/test/mac/nr/sched_nr_cfg_generators.h b/srsenb/test/mac/nr/sched_nr_cfg_generators.h index 9665a1444..519568346 100644 --- a/srsenb/test/mac/nr/sched_nr_cfg_generators.h +++ b/srsenb/test/mac/nr/sched_nr_cfg_generators.h @@ -90,6 +90,10 @@ inline sched_nr_interface::ue_cfg_t get_default_ue_cfg( uecfg.phy_cfg = phy_cfg; uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH; + // Note: dynamic MCS not yet supported + uecfg.fixed_dl_mcs = 28; + uecfg.fixed_ul_mcs = 10; + return uecfg; }