From fa837925d0885343f789afa8d6049c98e3f162c5 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Wed, 28 Oct 2020 11:07:14 +0100 Subject: [PATCH] Fix inter-frequency/intra-enb HO --- srsenb/hdr/phy/phy_ue_db.h | 4 +++- srsenb/src/phy/phy_ue_db.cc | 12 +++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/srsenb/hdr/phy/phy_ue_db.h b/srsenb/hdr/phy/phy_ue_db.h index d2ad5c4d7..fa5bb9628 100644 --- a/srsenb/hdr/phy/phy_ue_db.h +++ b/srsenb/hdr/phy/phy_ue_db.h @@ -60,6 +60,9 @@ private: * Initially the the state is default (none) and it goes to inactive as soon as it is configured from the stack, then * it can transition to active as soon as the stack indicates so. * + * Consider that once the secondary serving cell is configured, the state transition between active and deactivated + * shall be performed by stack calls activation/deactivation and not re-configuration. + * * +---------+ Set SCell Configuration +-------------+ SCell activation +--------+ * | Default | --------------------------->| Deactivated |--------------------->| Active | * +---------+ +-------------+ +--------+ @@ -67,7 +70,6 @@ private: * | | | | | * --+ | | SCell deactivation | | * | +---------------------------------+ | - * | Reconfigure SCell | * | Remove SCell configuration | * +-----------------------------------------------------------------------------+ */ diff --git a/srsenb/src/phy/phy_ue_db.cc b/srsenb/src/phy/phy_ue_db.cc index 5468759fc..bd68b1d63 100644 --- a/srsenb/src/phy/phy_ue_db.cc +++ b/srsenb/src/phy/phy_ue_db.cc @@ -302,12 +302,14 @@ void phy_ue_db::addmod_rnti(uint16_t rnti, const phy_interface_rrc_lte::phy_rrc_ ue.pcell_cfg_stash = phy_rrc_dedicated.phy_cfg; _set_common_config_rnti(rnti, ue.pcell_cfg_stash); } else if (phy_rrc_dedicated.configured) { - // Only set to inactive if cell is not already configured - if (cell_info.state == cell_state_t::cell_state_none) { - cell_info.phy_cfg = phy_rrc_dedicated.phy_cfg; - _set_common_config_rnti(rnti, cell_info.phy_cfg); + // Overwrite the secondary serving cell configuration independently of the current state. Higher layers (MAC + // and/or RRC) shall be responsible for the secondary serving cell activation/deactivation. + cell_info.phy_cfg = phy_rrc_dedicated.phy_cfg; + _set_common_config_rnti(rnti, cell_info.phy_cfg); - // Set Cell state, all inactive by default + // Set Cell state to inactive (as configured) only if it was not configured before. Avoid losing coherence with + // MAC Activation/Deactivation states + if (cell_info.state == cell_state_t::cell_state_none) { cell_info.state = cell_state_secondary_inactive; } // Count Serving cell