add check for input number of antennas to be compliant with NB_ANTENNAS_TX and NB_ANTENNAS_RX

This commit is contained in:
francescomani
2026-02-25 16:26:21 +01:00
parent cdfe069c34
commit 2bd3685d6b
2 changed files with 12 additions and 0 deletions
+6
View File
@@ -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;