From 1da8994d18807f1a6edc0f7a264edf4f787d6219 Mon Sep 17 00:00:00 2001
From: Florian Kaltenberger <florian.kaltenberger@eurecom.fr>
Date: Fri, 13 Dec 2013 14:20:56 +0000
Subject: [PATCH] small update for better backward compatibility

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4720 818b1a75-f10b-46b9-bf7c-635c3b92a50f
---
 targets/ARCH/EXMIMO/DEFS/pcie_interface.h |  9 +--------
 targets/RTAI/USER/lte-softmodem.c         | 12 ++++++------
 2 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/targets/ARCH/EXMIMO/DEFS/pcie_interface.h b/targets/ARCH/EXMIMO/DEFS/pcie_interface.h
index 5e7e58a8231..2683cfa6e82 100644
--- a/targets/ARCH/EXMIMO/DEFS/pcie_interface.h
+++ b/targets/ARCH/EXMIMO/DEFS/pcie_interface.h
@@ -39,11 +39,8 @@
 
 #define FRAME_LENGTH_COMPLEX_SAMPLES   76800
 // Buffer size per channel: FRAME_LENGTH_COMPLEX_SAMPLES+2048 smp/frame: LTE frame+tail, *4 (7.68*4 MsmpPS), *4 Bytes/smp
-#ifdef PCIE_INTERFACE_V9
-#define ADAC_BUFFERSZ_PERCHAN_B  ((FRAME_LENGTH_COMPLEX_SAMPLES+2048)*4)
-#else
 #define ADAC_BUFFERSZ_PERCHAN_B  ((FRAME_LENGTH_COMPLEX_SAMPLES+2048)*4*4)
-#endif
+
 #define BIGSHM_SIZE_PAGES ((( MAX_FIRMWARE_BLOCK_SIZE_B + \
                               MAX_PRINTK_BUFFER_B + \
                               sizeof(exmimo_pci_interface_bot_t) +   \
@@ -322,11 +319,7 @@ typedef struct
   uint32_t adac_intr_period;      // e.g. 1024
   
   uint32_t switch_offset[4];      // sample offsets (relative to start of frame) used to control the RX/TX switch in TDD mode
-#ifdef PCIE_INTERFACE_V9
-  uint32_t resampling_factor;     // 0=>1, 1=>2, 2=>4, applied equally to each chain and TX/RX
-#else
   uint32_t resampling_factor[4];     // 0=>1, 1=>2, 2=>4, applied equally to each chain and TX/RX
-#endif
 } exmimo_framing_t;
 
 
diff --git a/targets/RTAI/USER/lte-softmodem.c b/targets/RTAI/USER/lte-softmodem.c
index e3b3b887408..6a07a5a85fb 100644
--- a/targets/RTAI/USER/lte-softmodem.c
+++ b/targets/RTAI/USER/lte-softmodem.c
@@ -1521,11 +1521,11 @@ int main(int argc, char **argv) {
     p_exmimo_config->framing.eNB_flag   = !UE_flag;
 
   p_exmimo_config->framing.tdd_config = DUPLEXMODE_FDD + TXRXSWITCH_LSB;
-#ifdef PCIE_INTERFACE_V9
-  p_exmimo_config->framing.resampling_factor = 2;
+#if (BOARD_SWREV_CNTL2>=0x0A)
+  p_exmimo_config->framing.resampling_factor[ant] = 2;
 #else
   for (ant=0; ant<4; ant++)
-    p_exmimo_config->framing.resampling_factor[ant] = 2;
+    p_exmimo_config->framing.resampling_factor = 2;
 #endif
 
   for (ant=0;ant<max(frame_parms->nb_antennas_tx,frame_parms->nb_antennas_rx);ant++) 
@@ -1938,10 +1938,10 @@ int main(int argc, char **argv) {
 void test_config(int card, int ant, unsigned int rf_mode, int UE_flag) {
     p_exmimo_config->framing.eNB_flag   = !UE_flag;
     p_exmimo_config->framing.tdd_config = 0;
-#ifdef PCIE_INTERFACE_V9
-    p_exmimo_config->framing.resampling_factor = 2;
-#else
+#if (BOARD_SWREV_CNTL2>=0x0A)
     p_exmimo_config->framing.resampling_factor[ant] = 2;
+#else
+    p_exmimo_config->framing.resampling_factor = 2;
 #endif
 
     p_exmimo_config->rf.rf_freq_rx[ant] = 1907600000;
-- 
GitLab