mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
add check for input number of antennas to be compliant with NB_ANTENNAS_TX and NB_ANTENNAS_RX
This commit is contained in:
@@ -1737,7 +1737,13 @@ static void NRRCconfig_RU(configmodule_interface_t *cfg)
|
||||
} /* strcmp(local_rf, "yes") != 0 */
|
||||
|
||||
ru->nb_tx = *param[RU_NB_TX_IDX].uptr;
|
||||
AssertFatal(ru->nb_tx <= NB_ANTENNAS_TX,
|
||||
"Config file has %d TX antennas set, but the compile time max value in NB_ANTENNAS_TX\n",
|
||||
ru->nb_tx);
|
||||
ru->nb_rx = *param[RU_NB_RX_IDX].uptr;
|
||||
AssertFatal(ru->nb_rx <= NB_ANTENNAS_RX,
|
||||
"Config file has %d RX antennas set, but the compile time max value in NB_ANTENNAS_RX\n",
|
||||
ru->nb_rx);
|
||||
ru->att_tx = *param[RU_ATT_TX_IDX].uptr;
|
||||
ru->att_rx = *param[RU_ATT_RX_IDX].uptr;
|
||||
ru->if_frequency = *param[RU_IF_FREQUENCY].u64ptr;
|
||||
|
||||
@@ -205,6 +205,12 @@ void nrue_set_ru_params(configmodule_interface_t *cfg)
|
||||
if (RUParamList.numelt <= 0) {
|
||||
nrue_ru_count = 1;
|
||||
nrue_rus = calloc_or_fail(nrue_ru_count, sizeof(nrUE_RU_params_t));
|
||||
AssertFatal(get_nrUE_params()->nb_antennas_tx <= NB_ANTENNAS_TX,
|
||||
"Config file has %d TX antennas set, but the compile time max value in NB_ANTENNAS_TX\n",
|
||||
get_nrUE_params()->nb_antennas_tx);
|
||||
AssertFatal(get_nrUE_params()->nb_antennas_rx <= NB_ANTENNAS_RX,
|
||||
"Config file has %d RX antennas set, but the compile time max value in NB_ANTENNAS_RX\n",
|
||||
get_nrUE_params()->nb_antennas_tx);
|
||||
nrue_rus[0] = (nrUE_RU_params_t){.nb_tx = get_nrUE_params()->nb_antennas_tx,
|
||||
.nb_rx = get_nrUE_params()->nb_antennas_rx,
|
||||
.att_tx = get_nrUE_params()->tx_gain,
|
||||
|
||||
Reference in New Issue
Block a user