From ac13e03f0ec69d2d12846ab80c02257ba3c71689 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Mon, 13 Mar 2017 13:14:22 +0100 Subject: [PATCH] fixed check in ul allocation --- srslte/lib/phch/ra.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/srslte/lib/phch/ra.c b/srslte/lib/phch/ra.c index f2164ec1b..678b61cc9 100644 --- a/srslte/lib/phch/ra.c +++ b/srslte/lib/phch/ra.c @@ -167,8 +167,8 @@ int srslte_ra_ul_dci_to_grant_prb_allocation(srslte_ra_ul_dci_t *dci, srslte_ra_ grant->freq_hopping = 1; } - if (grant->n_prb[0] + grant->L_prb < nof_prb && - grant->n_prb[1] + grant->L_prb < nof_prb) + if (grant->n_prb[0] + grant->L_prb <= nof_prb && + grant->n_prb[1] + grant->L_prb <= nof_prb) { return SRSLTE_SUCCESS; } else { @@ -252,6 +252,7 @@ int srslte_ra_ul_dci_to_grant(srslte_ra_ul_dci_t *dci, uint32_t nof_prb, uint32_ return SRSLTE_ERROR; } } else { + printf("Error computing UL PRB allocation\n"); return SRSLTE_ERROR; } return SRSLTE_SUCCESS;