From 3eb1b83a43bbaa80eb0088cca63456cc678881cc Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 12 Aug 2020 12:52:52 +0100 Subject: [PATCH] updated allocate crnti method in mac to accoutn for new phy interface --- srsenb/src/stack/mac/mac.cc | 9 --------- srsenb/src/stack/rrc/rrc_mobility.cc | 7 ++++++- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/srsenb/src/stack/mac/mac.cc b/srsenb/src/stack/mac/mac.cc index 97989c5bc..24f146130 100644 --- a/srsenb/src/stack/mac/mac.cc +++ b/srsenb/src/stack/mac/mac.cc @@ -469,15 +469,6 @@ uint16_t mac::reserve_new_crnti(const sched_interface::ue_cfg_t& ue_cfg) return SRSLTE_INVALID_RNTI; } - // Register new user in RRC - rrc_h->add_user(rnti, ue_cfg); - - // Add temporal rnti to the PHY - if (phy_h->add_rnti(rnti, ue_cfg.supported_cc_list[0].enb_cc_idx) != SRSLTE_SUCCESS) { - Error("Registering c-rnti=0x%x to PHY\n", rnti); - return SRSLTE_INVALID_RNTI; - } - // Allocate one new UE object in advance prealloc_ue(1); return rnti; diff --git a/srsenb/src/stack/rrc/rrc_mobility.cc b/srsenb/src/stack/rrc/rrc_mobility.cc index 13905fbc9..45a38ec5d 100644 --- a/srsenb/src/stack/rrc/rrc_mobility.cc +++ b/srsenb/src/stack/rrc/rrc_mobility.cc @@ -484,7 +484,9 @@ uint16_t rrc::enb_mobility_handler::start_ho_ue_resource_alloc( return SRSLTE_INVALID_RNTI; } - /* Allocate C-RNTI */ + /* Create new User */ + + // Allocate C-RNTI in MAC sched_interface::ue_cfg_t ue_cfg = {}; ue_cfg.supported_cc_list.resize(1); ue_cfg.supported_cc_list[0].active = true; @@ -497,6 +499,9 @@ uint16_t rrc::enb_mobility_handler::start_ho_ue_resource_alloc( return SRSLTE_INVALID_RNTI; } + // Register new user in RRC + rrc_ptr->add_user(rnti, ue_cfg); + // /* Setup e-RABs & DRBs / establish an UL/DL S1 bearer to the S-GW */ // if (not setup_ue_erabs(rnti, msg)) { // rrc_ptr->rrc_log->error("Failed to setup e-RABs for rnti=0x%x\n", );