From 00be4a5de7840f1d2cd7c7f023196c37dca2f780 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 14 Jul 2017 10:41:44 +0200 Subject: [PATCH] fix bug with uninitalized number of rx antennas --- lib/src/phy/ue/ue_cell_search.c | 2 +- srsue/src/phy/phy.cc | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/phy/ue/ue_cell_search.c b/lib/src/phy/ue/ue_cell_search.c index f8c38a1bb..f7d244387 100644 --- a/lib/src/phy/ue/ue_cell_search.c +++ b/lib/src/phy/ue/ue_cell_search.c @@ -95,7 +95,7 @@ int srslte_ue_cellsearch_init_multi(srslte_ue_cellsearch_t * q, uint32_t max_fra { int ret = SRSLTE_ERROR_INVALID_INPUTS; - if (q != NULL) { + if (q != NULL && nof_rx_antennas > 0) { ret = SRSLTE_ERROR; srslte_cell_t cell; diff --git a/srsue/src/phy/phy.cc b/srsue/src/phy/phy.cc index cf673cce6..dea66346b 100644 --- a/srsue/src/phy/phy.cc +++ b/srsue/src/phy/phy.cc @@ -59,6 +59,7 @@ phy::phy() : workers_pool(MAX_WORKERS), void phy::set_default_args(phy_args_t *args) { + args->nof_rx_ant = 1; args->ul_pwr_ctrl_en = false; args->prach_gain = -1; args->cqi_max = -1;