From a21536a60e4c008a69c083179d783dfdb43b7318 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Tue, 29 Nov 2016 20:18:12 +0100 Subject: [PATCH] fixed get band in phy_common --- srslte/lib/common/phy_common.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/srslte/lib/common/phy_common.c b/srslte/lib/common/phy_common.c index e3429e0a3..68532ebeb 100644 --- a/srslte/lib/common/phy_common.c +++ b/srslte/lib/common/phy_common.c @@ -431,14 +431,9 @@ float get_fd(struct lte_band *band, uint32_t earfcn) { } int srslte_band_get_band(uint32_t earfcn) { - uint32_t i; - i=0; - while(i < SRSLTE_NOF_LTE_BANDS && lte_bands[i].earfcn_offset 0 && lte_bands[i].earfcn_offset>earfcn) { + i--; } return lte_bands[i].band; }