|
|
@ -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
|
|
|
|
// auto-detect UL frequency
|
|
|
|
if (cfg.ul_earfcn == 0) {
|
|
|
|
if (cfg.ul_earfcn == 0) {
|
|
|
|
// derive UL ARFCN from given DL ARFCN
|
|
|
|
// 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);
|
|
|
|
cfg.ul_earfcn = band_helper.get_ul_arfcn_from_dl_arfcn(cfg.dl_earfcn);
|
|
|
|
srsran_duplex_mode_t nr_duplex = band_helper.get_duplex_mode(nr_band);
|
|
|
|
if (cfg.ul_earfcn == 0) {
|
|
|
|
if (nr_duplex == SRSRAN_DUPLEX_MODE_TDD) {
|
|
|
|
ERROR("Can't derive UL ARFCN from DL ARFCN %d", cfg.dl_earfcn);
|
|
|
|
cfg.ul_earfcn = cfg.dl_earfcn;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
ERROR("Can't derive UL ARFCN from DL ARFCN");
|
|
|
|
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
return SRSRAN_ERROR;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|