From bca775a59498d1f10f3061fa097b5fcb6463a5d7 Mon Sep 17 00:00:00 2001
From: Abhijith <abhijitha@iisc.ac.in>
Date: Mon, 24 May 2021 14:18:26 +0530
Subject: [PATCH] Fixed compilation issues

---
 cmake_targets/CMakeLists.txt               | 2 +-
 cmake_targets/epc_test/CMakeLists.template | 2 +-
 openair1/SIMULATION/NR_PHY/dlsim.c         | 2 +-
 openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c | 5 +++--
 openair2/NR_PHY_INTERFACE/NR_IF_Module.c   | 4 ----
 5 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/cmake_targets/CMakeLists.txt b/cmake_targets/CMakeLists.txt
index acc27404c08..8d8e88455a4 100644
--- a/cmake_targets/CMakeLists.txt
+++ b/cmake_targets/CMakeLists.txt
@@ -396,7 +396,7 @@ add_definitions("-DPACKAGE_BUGREPORT=\"openair4g-devel@lists.eurecom.fr\"")
 
 # Debug related options
 #########################################
-add_boolean_option(ASN_DEBUG           True "ASN1 coder/decoder Debug")
+add_boolean_option(ASN_DEBUG           False "ASN1 coder/decoder Debug")
 add_boolean_option(EMIT_ASN_DEBUG      False "ASN1 coder/decoder Debug")
 add_boolean_option(MSG_PRINT           False "print debug messages")
 add_boolean_option(DISABLE_XER_PRINT   False "print XER Format")
diff --git a/cmake_targets/epc_test/CMakeLists.template b/cmake_targets/epc_test/CMakeLists.template
index 1efbd1340ca..7a097fffb02 100755
--- a/cmake_targets/epc_test/CMakeLists.template
+++ b/cmake_targets/epc_test/CMakeLists.template
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8)
 
 set (  CMAKE_BUILD_TYPE "RelWithDebInfo" )
-set (  ASN_DEBUG True)
+set (  ASN_DEBUG False)
 set (  DEBUG_OMG False )
 set (  DISABLE_XER_PRINT False )
 set (  DRIVER2013 True )
diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c
index abf8faf2250..aed4cb68ed6 100644
--- a/openair1/SIMULATION/NR_PHY/dlsim.c
+++ b/openair1/SIMULATION/NR_PHY/dlsim.c
@@ -353,7 +353,7 @@ int main(int argc, char **argv)
   NB_UE_INST = 1;
   //double pbch_sinr;
   //int pbch_tx_ant;
-  int N_RB_DL=106,mu=2;
+  int N_RB_DL=106,mu=1;
 
   //unsigned char frame_type = 0;
 
diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
index ee54386c5fe..a0c172a700b 100644
--- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
@@ -330,9 +330,10 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   gNB_MAC_INST *gNB = RC.nrmac[module_idP];
   NR_COMMON_channels_t *cc = gNB->common_channels;
   NR_ServingCellConfigCommon_t        *scc     = cc->ServingCellConfigCommon;
+  const int bwp_id = *gNB->secondaryCellGroupCommon->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id;
+
   
   // NR_TDD_UL_DL_Pattern_t *tdd_pattern = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
-  // const int bwp_id = *gNB->secondaryCellGroupCommon->spCellConfig->spCellConfigDedicated->firstActiveDownlinkBWP_Id;
 
   // switch(scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity) {
   //   case 0:
@@ -370,7 +371,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
   //   default:
   //     AssertFatal(1==0,"Undefined tdd period %ld\n", scc->tdd_UL_DL_ConfigurationCommon->pattern1.dl_UL_TransmissionPeriodicity);
   
-  }
+  // }
 
   if (slot==0 && (*scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0]>=257)) {
     const NR_TDD_UL_DL_Pattern_t *tdd = &scc->tdd_UL_DL_ConfigurationCommon->pattern1;
diff --git a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
index 14ad8b7a9db..7bf738e0439 100644
--- a/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
+++ b/openair2/NR_PHY_INTERFACE/NR_IF_Module.c
@@ -106,10 +106,6 @@ void handle_nr_uci(NR_UL_IND_t *UL_info)
 
   UL_info->uci_ind.num_ucis = 0;
 
-  // mark corresponding PUCCH resources as free
-  // NOTE: we just assume it is BWP ID 1, to be revised for multiple BWPs
-  //Abhi : TODO
-  RC.nrmac[mod_id]->pucch_index_used[1][slot] = 0;
 }
 
 
-- 
GitLab