From f7b6d16c4ec6845c23df2d266de7de7c24a30210 Mon Sep 17 00:00:00 2001
From: Raymond Knopp <raymond.knopp@eurecom.fr>
Date: Wed, 8 Jun 2016 19:27:11 +0200
Subject: [PATCH] initializations for LMSSDR

---
 openair1/SCHED/phy_procedures_lte_eNb.c | 4 +++-
 targets/RT/USER/lte-enb.c               | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/openair1/SCHED/phy_procedures_lte_eNb.c b/openair1/SCHED/phy_procedures_lte_eNb.c
index 4601781e68..de44777c33 100755
--- a/openair1/SCHED/phy_procedures_lte_eNb.c
+++ b/openair1/SCHED/phy_procedures_lte_eNb.c
@@ -2512,12 +2512,14 @@ void phy_procedures_eNB_common_RX(PHY_VARS_eNB *eNB,const uint8_t abstraction_fl
 				     fp->nb_antennas_rx);
 	proc->frame_rx    = (proc->timestamp_rx / (fp->samples_per_tti*10))&1023;
 	proc->subframe_rx = (proc->timestamp_rx / fp->samples_per_tti)%10;
+	/*	printf("Frame %d, subframe %d : TS %lu => %d,%d (rxs %d)\n",
+		frame,subframe,proc->timestamp_rx,proc->frame_rx,proc->subframe_rx,rxs);*/
 	if (proc->first_rx == 0) {
 	  AssertFatal(proc->subframe_rx == subframe, "Received Timestamp doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)",proc->subframe_rx,subframe);
 	  AssertFatal(proc->frame_rx == frame, "Received Timestamp doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)",proc->frame_rx,frame);
 	}
 	else
-	  proc->first_rx = 0;
+	  proc->first_rx--;// = 0;
 
 	//	printf("timestamp_rx %lu, frame %d(%d), subframe %d(%d)\n",proc->timestamp_rx,proc->frame_rx,frame,proc->subframe_rx,subframe);
 
diff --git a/targets/RT/USER/lte-enb.c b/targets/RT/USER/lte-enb.c
index 373a13e150..7ab31098d2 100644
--- a/targets/RT/USER/lte-enb.c
+++ b/targets/RT/USER/lte-enb.c
@@ -1045,7 +1045,7 @@ void init_eNB_proc(void)
     proc->instance_cnt_prach = -1;
     proc->CC_id = CC_id;
 
-    proc->first_rx=1;
+    proc->first_rx=4;
 
     pthread_mutex_init( &proc_rxtx[0].mutex_rxtx, NULL);
     pthread_mutex_init( &proc_rxtx[1].mutex_rxtx, NULL);
-- 
GitLab