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.
This commit is contained in:
Andre Puschmann 2021-04-25 22:05:16 +02:00
parent b569e81299
commit 20575d3eec
1 changed files with 6 additions and 2 deletions

View File

@ -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++) {