From 2e10c8e13df3fc67c2ac5a6e858d8e44dfe84dd0 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 2 Oct 2020 17:41:37 +0100 Subject: [PATCH] bug fix - eNB was not allocating UL grants for an UE that has performed intra-enb handover. The problem resulted from the fact that the ue configuration in the scheduler not accounting for removed cells. --- srsenb/src/stack/mac/scheduler_ue.cc | 9 +++++++-- srsenb/src/stack/rrc/mac_controller.cc | 2 -- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/srsenb/src/stack/mac/scheduler_ue.cc b/srsenb/src/stack/mac/scheduler_ue.cc index 1f7d0566c..07027bebe 100644 --- a/srsenb/src/stack/mac/scheduler_ue.cc +++ b/srsenb/src/stack/mac/scheduler_ue.cc @@ -126,7 +126,12 @@ void sched_ue::set_cfg(const sched_interface::ue_cfg_t& cfg_) // update bearer cfgs lch_handler.set_cfg(cfg_); - // either add a new carrier, or reconfigure existing one + // in case carriers have been removed + while (carriers.size() > cfg.supported_cc_list.size()) { + // TODO: distinguish cell deactivation from reconfiguration + carriers.pop_back(); + } + // in case carriers have been added or modified bool scell_activation_state_changed = false; for (uint32_t ue_idx = 0; ue_idx < cfg.supported_cc_list.size(); ++ue_idx) { auto& cc_cfg = cfg.supported_cc_list[ue_idx]; @@ -138,7 +143,7 @@ void sched_ue::set_cfg(const sched_interface::ue_cfg_t& cfg_) // One carrier was added in the place of another carriers[ue_idx] = cc_sched_ue{cfg, (*cell_params_list)[cc_cfg.enb_cc_idx], rnti, ue_idx}; if (ue_idx == 0) { - log_h->info("SCHED: rnti=0x%x PCell is now %d.\n", rnti, cc_cfg.enb_cc_idx); + log_h->info("SCHED: rnti=0x%x PCell is now enb_cc_idx=%d.\n", rnti, cc_cfg.enb_cc_idx); } } else { // The SCell internal configuration may have changed diff --git a/srsenb/src/stack/rrc/mac_controller.cc b/srsenb/src/stack/rrc/mac_controller.cc index b3398ef8f..50090a48d 100644 --- a/srsenb/src/stack/rrc/mac_controller.cc +++ b/srsenb/src/stack/rrc/mac_controller.cc @@ -150,8 +150,6 @@ void rrc::ue::mac_controller::handle_con_reconf(const asn1::rrc::rrc_conn_recfg_ handle_con_reconf_with_mobility(); } - // Assume rest of parameters in current_sched_ue_cfg do not change in a Reconfig - // Apply changes to MAC scheduler mac->ue_cfg(rrc_ue->rnti, ¤t_sched_ue_cfg); mac->phy_config_enabled(rrc_ue->rnti, false);