From 4fe68e2d54a42fcff28339b38585831ae3f74bae Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 24 Mar 2020 11:52:45 +0100 Subject: [PATCH] Verify that cell is valid before configuring scell --- srsue/src/phy/cc_worker.cc | 2 +- srsue/src/phy/phy.cc | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/srsue/src/phy/cc_worker.cc b/srsue/src/phy/cc_worker.cc index 89b53c1a4..256918046 100644 --- a/srsue/src/phy/cc_worker.cc +++ b/srsue/src/phy/cc_worker.cc @@ -133,7 +133,7 @@ bool cc_worker::set_cell(srslte_cell_t cell_) cell = cell_; if (srslte_ue_dl_set_cell(&ue_dl, cell)) { - Error("Initiating UE DL\n"); + Error("Setting ue_dl cell\n"); return false; } diff --git a/srsue/src/phy/phy.cc b/srsue/src/phy/phy.cc index 60552f613..75e8b83b4 100644 --- a/srsue/src/phy/phy.cc +++ b/srsue/src/phy/phy.cc @@ -437,6 +437,13 @@ void phy::set_config(srslte::phy_cfg_t& config_, uint32_t cc_idx, uint32_t earfc return; } + // Disable cell_info if configuration has not been set + if (cell_info) { + if (!srslte_cell_isvalid(cell_info)) { + cell_info = nullptr; + } + } + // Component carrier index zero should be reserved for PCell if (cc_idx < args.nof_carriers) { // Send configuration to workers