From 20575d3eec1c956b56397a4b87773f32bb48225a Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Sun, 25 Apr 2021 22:05:16 +0200 Subject: [PATCH] phy,enb: only initialize NR workers if needed the NR support in the eNB isn't finished yet but loading all DL objects even for 4G only isn't required. So only even attempt to load them if a NR cell is configured. --- srsenb/src/phy/phy.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/srsenb/src/phy/phy.cc b/srsenb/src/phy/phy.cc index 85fe2a507..f1f8cb535 100644 --- a/srsenb/src/phy/phy.cc +++ b/srsenb/src/phy/phy.cc @@ -130,8 +130,12 @@ int phy::init(const phy_args_t& args, parse_common_config(cfg); // Add workers to workers pool and start threads - lte_workers.init(args, &workers_common, log_sink, WORKERS_THREAD_PRIO); - nr_workers.init(args, &workers_common, log_sink, WORKERS_THREAD_PRIO); + if (not cfg.phy_cell_cfg.empty()) { + lte_workers.init(args, &workers_common, log_sink, WORKERS_THREAD_PRIO); + } + if (not cfg.phy_cell_cfg_nr.empty()) { + nr_workers.init(args, &workers_common, log_sink, WORKERS_THREAD_PRIO); + } // For each carrier, initialise PRACH worker for (uint32_t cc = 0; cc < cfg.phy_cell_cfg.size(); cc++) {