From 7785b5aa3d1d308484aff180c3e9d849fcef3e3b Mon Sep 17 00:00:00 2001
From: Raymond Knopp <raymond.knopp@eurecom.fr>
Date: Fri, 31 Oct 2014 18:20:40 +0000
Subject: [PATCH] git-svn-id: http://svn.eurecom.fr/openair4G/trunk@5951
 818b1a75-f10b-46b9-bf7c-635c3b92a50f

---
 openair2/LAYER2/MAC/defs.h                     | 2 +-
 openair2/LAYER2/MAC/eNB_scheduler_primitives.c | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/openair2/LAYER2/MAC/defs.h b/openair2/LAYER2/MAC/defs.h
index bd8cc85dac9..2cd256185d6 100644
--- a/openair2/LAYER2/MAC/defs.h
+++ b/openair2/LAYER2/MAC/defs.h
@@ -646,7 +646,7 @@ typedef struct {
 ///subband bitmap coniguration (for ALU icic algo purpose), in test phase
 
 typedef struct{
-	uint8_t sbmap[NUMBER_OF_SUBBANDS]; //13 = number of SB MAX for 100 PRB
+	uint8_t sbmap[NUMBER_OF_SUBBANDS_MAX]; //13 = number of SB MAX for 100 PRB
 	uint8_t periodicity;
 	uint8_t first_subframe;
 	uint8_t sb_size;
diff --git a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
index f2e8a2595a3..7d4bd078e81 100644
--- a/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
+++ b/openair2/LAYER2/MAC/eNB_scheduler_primitives.c
@@ -714,12 +714,13 @@ uint32_t allocate_prbs_sub(int nb_rb, uint8_t *rballoc) {
   LOG_T(MAC,"*****Check1RBALLOC****: %d%d%d%d (nb_rb %d,N_RBG %d)\n",
       rballoc[3],rballoc[2],rballoc[1],rballoc[0],nb_rb,mac_xface->lte_frame_parms->N_RBG);
   while((nb_rb >0) && (check < mac_xface->lte_frame_parms->N_RBG)){
-      //printf("rballoc[%d] %d\n",check,rballoc[check]);
+    //printf("rballoc[%d] %d\n",check,rballoc[check]);
       if(rballoc[check] == 1){
           rballoc_dci |= (1<<((mac_xface->lte_frame_parms->N_RBG-1)-check));
           switch (mac_xface->lte_frame_parms->N_RB_DL) {
           case 6:
             nb_rb--;
+	    break;
           case 25:
             if ((check == mac_xface->lte_frame_parms->N_RBG-1))
               nb_rb--;
@@ -737,7 +738,7 @@ uint32_t allocate_prbs_sub(int nb_rb, uint8_t *rballoc) {
             break;
           }
       }
-      //printf("rb_alloc %x\n",rballoc_dci);
+      //      printf("rb_alloc %x\n",rballoc_dci);
       check = check+1;
       //    check1 = check1+2;
   }
-- 
GitLab