diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index 29b4434405..17fb37edba 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -654,11 +654,14 @@ static void config_common(gNB_MAC_INST *nrmac, nr_pdsch_AntennaPorts_t pdsch_Ant scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSlots, scc->tdd_UL_DL_ConfigurationCommon->pattern1.nrofUplinkSymbols); - if (periods_per_frame < 0) - LOG_E(NR_MAC, "TDD configuration can not be done\n"); - else { - LOG_I(NR_MAC, "TDD has been properly configurated\n"); - nrmac->tdd_beam_association = (int16_t *)malloc16(periods_per_frame * sizeof(int16_t)); + AssertFatal(periods_per_frame > 0, "TDD configuration cannot be configured\n"); + if (frequency_range == FR2) { + LOG_I(NR_MAC, "Configuring TDD beam association to default\n"); + nrmac->tdd_beam_association = malloc16(periods_per_frame * sizeof(int16_t)); + for (int i = 0; i < periods_per_frame; ++i) + nrmac->tdd_beam_association[i] = -1; /* default: beams not configured */ + } else { + nrmac->tdd_beam_association = NULL; /* default: no beams */ } }