From 935afe6ef35886956aeb722c4d64f5bde708bd6d Mon Sep 17 00:00:00 2001 From: Paul Sutton Date: Thu, 2 Nov 2017 17:44:56 +0000 Subject: [PATCH 1/2] Minor soapy fix --- lib/src/phy/rf/rf_soapy_imp.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/lib/src/phy/rf/rf_soapy_imp.c b/lib/src/phy/rf/rf_soapy_imp.c index fef533ffc..18c5b01cd 100644 --- a/lib/src/phy/rf/rf_soapy_imp.c +++ b/lib/src/phy/rf/rf_soapy_imp.c @@ -286,11 +286,6 @@ double rf_soapy_set_rx_srate(void *h, double rate) return SRSLTE_ERROR; } - if (SoapySDRDevice_setBandwidth(handler->device, SOAPY_SDR_RX, 0, rate) != 0) { - printf("setBandwidth Rx failed: %s\n", SoapySDRDevice_lastError()); - return SRSLTE_ERROR; - } - return SoapySDRDevice_getSampleRate(handler->device, SOAPY_SDR_RX,0); } @@ -302,11 +297,6 @@ double rf_soapy_set_tx_srate(void *h, double rate) return SRSLTE_ERROR; } - if (SoapySDRDevice_setBandwidth(handler->device, SOAPY_SDR_TX, 0, rate) != 0) { - printf("setBandwidth Tx failed: %s\n", SoapySDRDevice_lastError()); - return SRSLTE_ERROR; - } - return SoapySDRDevice_getSampleRate(handler->device, SOAPY_SDR_TX,0); } From 344ace8f52289c50caf61459cb5ff6ddec891fe4 Mon Sep 17 00:00:00 2001 From: Ismael Gomez Date: Sun, 12 Nov 2017 11:43:56 +0100 Subject: [PATCH 2/2] Fix issue #120 --- lib/src/phy/phch/ra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/phy/phch/ra.c b/lib/src/phy/phch/ra.c index be10c304c..19b78c60a 100644 --- a/lib/src/phy/phch/ra.c +++ b/lib/src/phy/phch/ra.c @@ -663,7 +663,7 @@ uint32_t srslte_ra_type1_N_rb(uint32_t nof_prb) { /* Convert Type2 scheduling L_crb and RB_start to RIV value */ uint32_t srslte_ra_type2_to_riv(uint32_t L_crb, uint32_t RB_start, uint32_t nof_prb) { uint32_t riv; - if (L_crb <= nof_prb / 2) { + if ((L_crb - 1) <= nof_prb / 2) { riv = nof_prb * (L_crb - 1) + RB_start; } else { riv = nof_prb * (nof_prb - L_crb + 1) + nof_prb - 1 - RB_start; @@ -907,4 +907,4 @@ void srslte_ra_prb_fprint(FILE *f, srslte_ra_dl_grant_t *grant) { } } -} \ No newline at end of file +}