From 6de7b644ecff4a2e64b70a1a24104d6a942f4935 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Fri, 17 Apr 2020 12:57:29 +0100 Subject: [PATCH] schedule conres ce when pcell changes --- srsenb/src/stack/mac/scheduler_ue.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/srsenb/src/stack/mac/scheduler_ue.cc b/srsenb/src/stack/mac/scheduler_ue.cc index 317fcab11..f476492b1 100644 --- a/srsenb/src/stack/mac/scheduler_ue.cc +++ b/srsenb/src/stack/mac/scheduler_ue.cc @@ -140,9 +140,14 @@ void sched_ue::set_cfg(const sched_interface::ue_cfg_t& cfg_) // New carrier needs to be added carriers.emplace_back(cfg, (*cell_params_list)[cc_cfg.enb_cc_idx], rnti, ue_idx); } else if (cc_cfg.enb_cc_idx != prev_supported_cc_list[ue_idx].enb_cc_idx) { - // TODO: Check if this will ever happen. // One carrier was added in the place of another carriers[ue_idx] = sched_ue_carrier{cfg, (*cell_params_list)[cc_cfg.enb_cc_idx], rnti, ue_idx}; + if (ue_idx == 0) { + // PCell was changed possibly due to handover. Schedule a new ConRes CE to be transmitted after the Msg3 + conres_ce_pending = true; + lch[0].buf_tx = std::max(lch[0].buf_tx, 1); // TODO: find a cleaner way to schedule conres CE + log_h->info("SCHED: PCell has changed. ConRes CE scheduled\n"); + } } else { // The SCell internal configuration may have changed carriers[ue_idx].set_cfg(cfg);