From dddc07b84777a89e9f8c6e56de22a46b3901a184 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 27 Apr 2022 15:41:55 +0200 Subject: [PATCH] enb: add checker for unsupported/untested configs --- srsenb/src/enb_cfg_parser.cc | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 0edf9a6b4..8c94a6ef1 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -1798,6 +1798,24 @@ int set_derived_args_nr(all_args_t* args_, rrc_nr_cfg_t* rrc_nr_cfg_, phy_cfg_t* args_->nr_stack.mac.pcap.enable = args_->stack.mac_pcap.enable; args_->nr_stack.log = args_->stack.log; + // Sanity check for unsupported/untested configuration + for (auto& cfg : rrc_nr_cfg_->cell_list) { + if (cfg.phy_cell.carrier.nof_prb != 52) { + ERROR("Only 10 MHz bandwidth supported."); + return SRSRAN_ERROR; + } + if (rrc_nr_cfg_->is_standalone) { + if (cfg.phy_cell.carrier.dl_center_frequency_hz != 1842.5e6) { + ERROR("Only DL-ARFCN 368500 supported."); + return SRSRAN_ERROR; + } + if (cfg.duplex_mode == SRSRAN_DUPLEX_MODE_TDD) { + ERROR("Only FDD duplex supported in SA mode."); + return SRSRAN_ERROR; + } + } + } + return SRSRAN_SUCCESS; }