From f6beede730f3f3ea41fa4c07b5966eb52b01bb0b Mon Sep 17 00:00:00 2001
From: Raymond Knopp <raymond.knopp@eurecom.fr>
Date: Thu, 25 Feb 2016 09:30:44 -0800
Subject: [PATCH] fixed bug in generate_RIVtables for 20 MHz distributed VRB
 allocations (openair1/PHY/LTE_TRANSPORT/dci_tools.c)

---
 openair1/PHY/LTE_TRANSPORT/dci_tools.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/openair1/PHY/LTE_TRANSPORT/dci_tools.c b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
index c9d68cd0aa..f2d22e5231 100644
--- a/openair1/PHY/LTE_TRANSPORT/dci_tools.c
+++ b/openair1/PHY/LTE_TRANSPORT/dci_tools.c
@@ -734,11 +734,11 @@ void generate_RIV_tables()
       if (nVRB<32)
         alloc0 |= (1<<nVRB);
       else if (nVRB<64)
-        alloc1 |= (1<<(nVRB-33));
+        alloc1 |= (1<<(nVRB-32));
       else if (nVRB<96)
-        alloc2 |= (1<<(nVRB-65));
+        alloc2 |= (1<<(nVRB-64));
       else
-        alloc3 |= (1<<(nVRB-97));
+        alloc3 |= (1<<(nVRB-96));
 
       // Distributed Gap1, even slot
       nVRB_even_dist = get_prb(100,0,nVRB,0);
@@ -770,9 +770,9 @@ void generate_RIV_tables()
       else if (nVRB_odd_dist<64)
         allocdist1_0_odd |= (1<<(nVRB_odd_dist-32));
       else if (nVRB_odd_dist<96)
-	allocdist2_0_odd |= (1<<(nVRB_odd_dist-65));
+	allocdist2_0_odd |= (1<<(nVRB_odd_dist-64));
       else
-	allocdist3_0_odd |= (1<<(nVRB_odd_dist-97));
+	allocdist3_0_odd |= (1<<(nVRB_odd_dist-96));
 
 
       // Distributed Gap2, even slot
-- 
GitLab