From a8a66cb214cc6b678297bd1540cc703ce44da26e Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Thu, 14 Dec 2017 17:51:44 +0100 Subject: [PATCH] Block TM1 with more than 1 antenna and TM2-4 with less than 2 antennas --- srsenb/src/enb_cfg_parser.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index f10297760..26458e7a2 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -844,9 +844,17 @@ int enb::parse_rr(all_args_t* args, rrc_cfg_t* rrc_cfg) { /* Transmission mode config section */ - if (args->enb.transmission_mode < 0 || args->enb.transmission_mode > LIBLTE_RRC_TRANSMISSION_MODE_N_ITEMS) { + if (args->enb.transmission_mode < 0 || args->enb.transmission_mode > 4) { ERROR("Invalid transmission mode (%d). Only indexes 1-4 are implemented.\n", args->enb.transmission_mode); return SRSLTE_ERROR; + } else if (args->enb.transmission_mode == 1 && args->enb.nof_ports > 1) { + ERROR("Invalid number of ports (%d) for transmission mode (%d). Only one antenna port is allowed.\n", + args->enb.nof_ports, args->enb.transmission_mode); + return SRSLTE_ERROR; + } else if (args->enb.transmission_mode > 1 && args->enb.nof_ports != 2) { + ERROR("The selected number of ports (%d) are insufficient for the selected transmission mode (%d).\n", + args->enb.nof_ports, args->enb.transmission_mode); + return SRSLTE_ERROR; } bzero(&rrc_cfg->antenna_info, sizeof(LIBLTE_RRC_ANTENNA_INFO_DEDICATED_STRUCT));