From 39e00bdbe8215b0911c3f0487c3c97214687ae53 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Thu, 16 Sep 2021 15:41:19 +0200 Subject: [PATCH] enb,nsa: fix deriviation of UL ARFCN from DL ARFCN for FDD bands --- srsenb/src/enb_cfg_parser.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index d7666ef84..388b321ca 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -1194,12 +1194,9 @@ int set_derived_args(all_args_t* args_, rrc_cfg_t* rrc_cfg_, phy_cfg_t* phy_cfg_ // auto-detect UL frequency if (cfg.ul_earfcn == 0) { // derive UL ARFCN from given DL ARFCN - uint16_t nr_band = band_helper.get_band_from_dl_freq_Hz(phy_cell_cfg.dl_freq_hz); - srsran_duplex_mode_t nr_duplex = band_helper.get_duplex_mode(nr_band); - if (nr_duplex == SRSRAN_DUPLEX_MODE_TDD) { - cfg.ul_earfcn = cfg.dl_earfcn; - } else { - ERROR("Can't derive UL ARFCN from DL ARFCN"); + cfg.ul_earfcn = band_helper.get_ul_arfcn_from_dl_arfcn(cfg.dl_earfcn); + if (cfg.ul_earfcn == 0) { + ERROR("Can't derive UL ARFCN from DL ARFCN %d", cfg.dl_earfcn); return SRSRAN_ERROR; } }