Commit dfeb30ca authored by winckel's avatar winckel
Browse files

Fixed some issue with IP address copy in eNB application.

Modified eNB appilcation for lte-softmodem.
Changed log conponent to ENB_APP.
Addapted lte-softmodem to wait for eNB - MME registration before starting L2L1 task.
Fixed warnings.

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4601 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent c4b7d4c1
...@@ -109,16 +109,16 @@ static uint32_t eNB_app_register() ...@@ -109,16 +109,16 @@ static uint32_t eNB_app_register()
s1ap_register_eNB->nb_mme = 1; s1ap_register_eNB->nb_mme = 1;
s1ap_register_eNB->mme_ip_address[0].ipv4 = 1; s1ap_register_eNB->mme_ip_address[0].ipv4 = 1;
s1ap_register_eNB->mme_ip_address[0].ipv6 = 0; s1ap_register_eNB->mme_ip_address[0].ipv6 = 0;
memcpy (s1ap_register_eNB->mme_ip_address[0].ipv4_address, mme_address_v4, strlen (mme_address_v4)); strncpy (s1ap_register_eNB->mme_ip_address[0].ipv4_address, mme_address_v4, sizeof(s1ap_register_eNB->mme_ip_address[0].ipv4_address));
memcpy (s1ap_register_eNB->mme_ip_address[0].ipv6_address, mme_address_v6, strlen (mme_address_v6)); strncpy (s1ap_register_eNB->mme_ip_address[0].ipv6_address, mme_address_v6, sizeof(s1ap_register_eNB->mme_ip_address[0].ipv6_address));
# if defined ENB_APP_ENB_REGISTER_2_MME # if defined ENB_APP_ENB_REGISTER_2_MME
s1ap_register_eNB->nb_mme = 2; s1ap_register_eNB->nb_mme = 2;
s1ap_register_eNB->mme_ip_address[1].ipv4 = 1; s1ap_register_eNB->mme_ip_address[1].ipv4 = 1;
s1ap_register_eNB->mme_ip_address[1].ipv6 = 0; s1ap_register_eNB->mme_ip_address[1].ipv6 = 0;
mme_address_v4 = "192.168.12.88"; mme_address_v4 = "192.168.12.88";
memcpy(s1ap_register_eNB->mme_ip_address[1].ipv4_address, mme_address_v4, strlen(mme_address_v4)); strncpy(s1ap_register_eNB->mme_ip_address[1].ipv4_address, mme_address_v4, sizeof(s1ap_register_eNB->mme_ip_address[1].ipv4_address));
memcpy(s1ap_register_eNB->mme_ip_address[1].ipv6_address, mme_address_v6, strlen(mme_address_v6)); strncpy(s1ap_register_eNB->mme_ip_address[1].ipv6_address, mme_address_v6, sizeof(s1ap_register_eNB->mme_ip_address[1].ipv6_address));
# endif # endif
itti_send_msg_to_task (TASK_S1AP, eNB_id, msg_p); itti_send_msg_to_task (TASK_S1AP, eNB_id, msg_p);
...@@ -176,13 +176,13 @@ void *eNB_app_task(void *args_p) ...@@ -176,13 +176,13 @@ void *eNB_app_task(void *args_p)
break; break;
case MESSAGE_TEST: case MESSAGE_TEST:
LOG_I(EMU, "Received %s\n", ITTI_MSG_NAME(msg_p)); LOG_I(ENB_APP, "Received %s\n", ITTI_MSG_NAME(msg_p));
break; break;
# if defined(ENABLE_USE_MME) # if defined(ENABLE_USE_MME)
case S1AP_REGISTER_ENB_CNF: case S1AP_REGISTER_ENB_CNF:
LOG_I(EMU, LOG_I(ENB_APP, "[eNB %d] Received %s: associated MME %d\n", instance, msg_name,
"[eNB %d] Received %s: associated MME %d\n", instance, msg_name, S1AP_REGISTER_ENB_CNF(msg_p).nb_mme); S1AP_REGISTER_ENB_CNF(msg_p).nb_mme);
DevAssert(register_enb_pending > 0); DevAssert(register_enb_pending > 0);
register_enb_pending--; register_enb_pending--;
...@@ -208,21 +208,26 @@ void *eNB_app_task(void *args_p) ...@@ -208,21 +208,26 @@ void *eNB_app_task(void *args_p)
{ {
uint32_t not_associated = enb_nb - registered_enb; uint32_t not_associated = enb_nb - registered_enb;
LOG_W(EMU, " %d eNB %s not associated with a MME, retrying registration in %d seconds ...\n", LOG_W(ENB_APP, " %d eNB %s not associated with a MME, retrying registration in %d seconds ...\n",
not_associated, not_associated > 1 ? "are" : "is", ENB_REGISTER_RETRY_DELAY); not_associated, not_associated > 1 ? "are" : "is", ENB_REGISTER_RETRY_DELAY);
/* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */ /* Restart the eNB registration process in ENB_REGISTER_RETRY_DELAY seconds */
if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT, if (timer_setup (ENB_REGISTER_RETRY_DELAY, 0, TASK_ENB_APP, INSTANCE_DEFAULT, TIMER_ONE_SHOT,
NULL, &enb_register_retry_timer_id) < 0) NULL, &enb_register_retry_timer_id) < 0)
{ {
LOG_E(EMU, " Can not start eNB register retry timer!\n"); LOG_E(ENB_APP, " Can not start eNB register retry timer!\n");
usleep(ENB_REGISTER_RETRY_DELAY * 1000000);
/* Restart the registration process */
registered_enb = 0;
register_enb_pending = eNB_app_register ();
} }
} }
} }
break; break;
case TIMER_HAS_EXPIRED: case TIMER_HAS_EXPIRED:
LOG_I(EMU, " Received %s: timer_id %d\n", msg_name, TIMER_HAS_EXPIRED(msg_p).timer_id); LOG_I(ENB_APP, " Received %s: timer_id %d\n", msg_name, TIMER_HAS_EXPIRED(msg_p).timer_id);
if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id) if (TIMER_HAS_EXPIRED (msg_p).timer_id == enb_register_retry_timer_id)
{ {
...@@ -234,7 +239,7 @@ void *eNB_app_task(void *args_p) ...@@ -234,7 +239,7 @@ void *eNB_app_task(void *args_p)
# endif # endif
default: default:
LOG_E(EMU, "Received unexpected message %s\n", msg_name); LOG_E(ENB_APP, "Received unexpected message %s\n", msg_name);
break; break;
} }
......
...@@ -75,6 +75,9 @@ OPENAIR2_TOP = $(OPENAIR2_DIR) ...@@ -75,6 +75,9 @@ OPENAIR2_TOP = $(OPENAIR2_DIR)
include $(OPENAIR2_DIR)/LAYER2/Makefile.inc include $(OPENAIR2_DIR)/LAYER2/Makefile.inc
include $(OPENAIR2_DIR)/UTIL/Makefile.inc include $(OPENAIR2_DIR)/UTIL/Makefile.inc
include $(OPENAIR2_DIR)/RRC/NAS/Makefile.inc include $(OPENAIR2_DIR)/RRC/NAS/Makefile.inc
include $(OPENAIR2_DIR)/ENB_APP/Makefile.inc
OBJ += $(ENB_APP_OBJS)
ifeq ($(RTAI),1) ifeq ($(RTAI),1)
LOG_OBJS= LOG_OBJS=
...@@ -101,7 +104,7 @@ ifdef ENABLE_ITTI ...@@ -101,7 +104,7 @@ ifdef ENABLE_ITTI
RTAI_OBJ += $(UTILS_OBJS) RTAI_OBJ += $(UTILS_OBJS)
endif endif
CFLAGS += $(L2_incl) $(UTIL_incl) $(UTILS_incl) CFLAGS += $(L2_incl) $(ENB_APP_incl) $(UTIL_incl) $(UTILS_incl)
CFLAGS += -I$(OPENAIR1_DIR) -I$(OPENAIR2_DIR)/RRC/LITE/MESSAGES #-I$(OPENAIR3_DIR)/MESH -I$(OPENAIR3_DIR)/MESH/RRM CFLAGS += -I$(OPENAIR1_DIR) -I$(OPENAIR2_DIR)/RRC/LITE/MESSAGES #-I$(OPENAIR3_DIR)/MESH -I$(OPENAIR3_DIR)/MESH/RRM
......
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#include <getopt.h> #include <getopt.h>
#include "rt_wrapper.h" #include "rt_wrapper.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#include "assertions.h" #include "assertions.h"
#ifdef EMOS #ifdef EMOS
...@@ -59,8 +61,13 @@ ...@@ -59,8 +61,13 @@
#endif #endif
#include "PHY/types.h" #include "PHY/types.h"
#include "PHY/defs.h" #include "PHY/defs.h"
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "openair0_lib.h" #include "openair0_lib.h"
#undef FRAME_LENGTH_COMPLEX_SAMPLES //there are two conflicting definitions, so we better make sure we don't use it at all
#include "PHY/vars.h" #include "PHY/vars.h"
#include "MAC_INTERFACE/vars.h" #include "MAC_INTERFACE/vars.h"
...@@ -75,6 +82,7 @@ ...@@ -75,6 +82,7 @@
#endif #endif
#ifdef OPENAIR2 #ifdef OPENAIR2
#include "otg_tx.h"
#include "LAYER2/MAC/defs.h" #include "LAYER2/MAC/defs.h"
#include "LAYER2/MAC/vars.h" #include "LAYER2/MAC/vars.h"
#ifndef CELLULAR #ifndef CELLULAR
...@@ -93,6 +101,8 @@ unsigned short config_frames[4] = {2,9,11,13}; ...@@ -93,6 +101,8 @@ unsigned short config_frames[4] = {2,9,11,13};
#include "UTIL/MATH/oml.h" #include "UTIL/MATH/oml.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "enb_app.h"
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
# include "intertask_interface_init.h" # include "intertask_interface_init.h"
# include "timer.h" # include "timer.h"
...@@ -117,8 +127,6 @@ unsigned char scope_enb_num_ue = 1; ...@@ -117,8 +127,6 @@ unsigned char scope_enb_num_ue = 1;
#define FRAME_PERIOD 100000000ULL #define FRAME_PERIOD 100000000ULL
#define DAQ_PERIOD 66667ULL #define DAQ_PERIOD 66667ULL
#undef MALLOC //there are two conflicting definitions, so we better make sure we don't use it at all
#ifdef RTAI #ifdef RTAI
static SEM *mutex; static SEM *mutex;
//static CND *cond; //static CND *cond;
...@@ -149,6 +157,9 @@ exmimo_config_t *p_exmimo_config; ...@@ -149,6 +157,9 @@ exmimo_config_t *p_exmimo_config;
exmimo_id_t *p_exmimo_id; exmimo_id_t *p_exmimo_id;
volatile unsigned int *DAQ_MBOX; volatile unsigned int *DAQ_MBOX;
#if defined(ENABLE_ITTI)
volatile int start_eNB = 0;
#endif
volatile int oai_exit = 0; volatile int oai_exit = 0;
//int time_offset[4] = {-138,-138,-138,-138}; //int time_offset[4] = {-138,-138,-138,-138};
...@@ -197,7 +208,7 @@ void setup_ue_buffers(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS *frame_parms, ...@@ -197,7 +208,7 @@ void setup_ue_buffers(PHY_VARS_UE *phy_vars_ue, LTE_DL_FRAME_PARMS *frame_parms,
void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS *frame_parms, int carrier); void setup_eNB_buffers(PHY_VARS_eNB *phy_vars_eNB, LTE_DL_FRAME_PARMS *frame_parms, int carrier);
void test_config(int card, int ant, unsigned int rf_mode, int UE_flag); void test_config(int card, int ant, unsigned int rf_mode, int UE_flag);
unsigned int build_rflocal(txi, txq, rxi, rxq) unsigned int build_rflocal(int txi, int txq, int rxi, int rxq)
{ {
return (txi + (txq<<6) + (rxi<<12) + (rxq<<18)); return (txi + (txq<<6) + (rxi<<12) + (rxq<<18));
} }
...@@ -227,9 +238,6 @@ void signal_handler(int sig) ...@@ -227,9 +238,6 @@ void signal_handler(int sig)
void exit_fun(const char* s) void exit_fun(const char* s)
{ {
void *array[10];
size_t size;
printf("Exiting: %s\n",s); printf("Exiting: %s\n",s);
oai_exit=1; oai_exit=1;
...@@ -458,11 +466,27 @@ void *emos_thread (void *arg) ...@@ -458,11 +466,27 @@ void *emos_thread (void *arg)
#endif #endif
#if defined(ENABLE_ITTI) #if defined(ENABLE_ITTI)
void *dummy_l2l1_task(void *arg) void *l2l1_task(void *arg)
{ {
MessageDef *message_p = NULL;
itti_set_task_real_time(TASK_L2L1); itti_set_task_real_time(TASK_L2L1);
itti_mark_task_ready(TASK_L2L1); itti_mark_task_ready(TASK_L2L1);
if (UE_flag == 0) {
/* Wait for the initialize message */
do {
if (message_p != NULL) {
free (message_p);
}
itti_receive_msg (TASK_L2L1, &message_p);
} while (ITTI_MSG_ID(message_p) != INITIALIZE_MESSAGE);
free (message_p);
/* Start eNB thread */
start_eNB = 1;
}
while (!oai_exit) while (!oai_exit)
{ {
usleep(500000); usleep(500000);
...@@ -471,6 +495,64 @@ void *dummy_l2l1_task(void *arg) ...@@ -471,6 +495,64 @@ void *dummy_l2l1_task(void *arg)
} }
#endif #endif
#if defined(ENABLE_ITTI)
static int create_tasks(uint32_t enb_nb, uint32_t ue_nb) {
# if defined(ENABLE_USE_MME)
{
if (enb_nb > 0) {
if (itti_create_task(TASK_SCTP, sctp_eNB_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing SCTP task interface: FAILED\n");
return -1;
}
if (itti_create_task(TASK_S1AP, s1ap_eNB_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing S1AP task interface: FAILED\n");
return -1;
}
}
}
# endif
# ifdef OPENAIR2
{
if (enb_nb > 0) {
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing RRC eNB task interface: FAILED\n");
exit (-1);
}
}
if (ue_nb > 0) {
if (itti_create_task (TASK_RRC_UE, rrc_ue_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing RRC UE task interface: FAILED\n");
exit (-1);
}
}
}
# endif
if (itti_create_task(TASK_L2L1, l2l1_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing L2L1 task interface: FAILED\n");
return -1;
}
if (enb_nb > 0) {
/* Last task to create, others task must be ready before its start */
if (itti_create_task(TASK_ENB_APP, eNB_app_task, NULL) < 0) {
LOG_E(EMU, "Create task failed");
LOG_D(EMU, "Initializing eNB APP task interface: FAILED\n");
return -1;
}
}
return 0;
}
#endif
/* This is the main eNB thread. It gets woken up by the kernel driver using the RTAI message mechanism (rt_send and rt_receive). */ /* This is the main eNB thread. It gets woken up by the kernel driver using the RTAI message mechanism (rt_send and rt_receive). */
static void *eNB_thread(void *arg) static void *eNB_thread(void *arg)
{ {
...@@ -479,7 +561,6 @@ static void *eNB_thread(void *arg) ...@@ -479,7 +561,6 @@ static void *eNB_thread(void *arg)
#endif #endif
unsigned char slot=0,last_slot, next_slot; unsigned char slot=0,last_slot, next_slot;
int hw_slot,frame=0; int hw_slot,frame=0;
unsigned int msg1;
unsigned int aa,slot_offset, slot_offset_F; unsigned int aa,slot_offset, slot_offset_F;
int diff; int diff;
int delay_cnt; int delay_cnt;
...@@ -488,8 +569,27 @@ static void *eNB_thread(void *arg) ...@@ -488,8 +569,27 @@ static void *eNB_thread(void *arg)
int i,ret; int i,ret;
int tx_offset; int tx_offset;
#if defined(ENABLE_ITTI)
/* Wait for eNB application initialization to be complete (eNB registration to MME) */
{
char *indicator[] = {". ", ".. ", "...", " ..", " .", " "};
int i = 0;
while ((!oai_exit) && (start_eNB == 0)) {
LOG_D(HW,"Waiting for eNB application to be ready %s\r", indicator[i]);
i = (i + 1) % (sizeof(indicator) / sizeof(indicator[0]));
usleep(200000);
}
LOG_D(HW,"\n");
}
#endif
#ifdef RTAI #ifdef RTAI
task = rt_task_init_schmod(nam2num("TASK0"), 0, 0, 0, SCHED_FIFO, 0xF); task = rt_task_init_schmod(nam2num("TASK0"), 0, 0, 0, SCHED_FIFO, 0xF);
#endif
if (!oai_exit) {
#ifdef RTAI
LOG_D(HW,"Started eNB thread (id %p)\n",task); LOG_D(HW,"Started eNB thread (id %p)\n",task);
#endif #endif
...@@ -691,6 +791,7 @@ static void *eNB_thread(void *arg) ...@@ -691,6 +791,7 @@ static void *eNB_thread(void *arg)
#ifdef HARD_RT #ifdef HARD_RT
rt_make_soft_real_time(); rt_make_soft_real_time();
#endif #endif
}
// clean task // clean task
#ifdef RTAI #ifdef RTAI
...@@ -706,18 +807,14 @@ static void *UE_thread(void *arg) ...@@ -706,18 +807,14 @@ static void *UE_thread(void *arg)
#ifdef RTAI #ifdef RTAI
RT_TASK *task; RT_TASK *task;
#endif #endif
RTIME in, out, diff; // RTIME in, out, diff;
int slot=0,frame=0,hw_slot,last_slot, next_slot; int slot=0,frame=0,hw_slot,last_slot, next_slot;
unsigned int msg1; // unsigned int aa;
unsigned int aa,slot_offset, slot_offset_F;
static int is_synchronized = 0; static int is_synchronized = 0;
static int received_slots = 0;
static int slot0 = 0;
int delay_cnt; int delay_cnt;
RTIME time_in; RTIME time_in;
int hw_slot_offset=0,rx_offset_mbox=0,mbox_target=0,mbox_current=0; int hw_slot_offset=0,rx_offset_mbox=0,mbox_target=0,mbox_current=0;
int diff2; int diff2;
static int first_run=1;
int i, ret; int i, ret;
#ifdef RTAI #ifdef RTAI
...@@ -830,10 +927,10 @@ static void *UE_thread(void *arg) ...@@ -830,10 +927,10 @@ static void *UE_thread(void *arg)
LOG_D(HW,"frame %d (%d), slot %d, hw_slot %d, last_slot %d (before): DAQ_MBOX %d\n",frame, PHY_vars_UE_g[0]->frame, slot,hw_slot,last_slot,DAQ_MBOX[0]); LOG_D(HW,"frame %d (%d), slot %d, hw_slot %d, last_slot %d (before): DAQ_MBOX %d\n",frame, PHY_vars_UE_g[0]->frame, slot,hw_slot,last_slot,DAQ_MBOX[0]);
*/ */
in = rt_get_time_ns(); // in = rt_get_time_ns();
phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[0], 0, 0,mode,0,NULL); phy_procedures_UE_lte (last_slot, next_slot, PHY_vars_UE_g[0], 0, 0,mode,0,NULL);
out = rt_get_time_ns(); // out = rt_get_time_ns();
diff = out-in; // diff = out-in;
/* /*
if (frame % 100 == 0) if (frame % 100 == 0)
...@@ -934,84 +1031,15 @@ static void *UE_thread(void *arg) ...@@ -934,84 +1031,15 @@ static void *UE_thread(void *arg)
return 0; return 0;
} }
void *eNB_app_task(void *args_p)
{
#if defined(ENABLE_ITTI) && defined(ENABLE_USE_MME)
MessageDef *message_p;
char *mme_address_v4;
char *mme_address_v6 = "2001:660:5502:12:30da:829a:2343:b6cf";
s1ap_register_enb_req_t *s1ap_register_eNB;
uint32_t hash;
if (EPC_MODE_ENABLED)
{
mme_address_v4 = EPC_MODE_MME_ADDRESS;
}
else
{
mme_address_v4 = "192.168.12.87";
}
/* FIXME: following parameters should be setup by eNB applicative layer ? */
message_p = itti_alloc_new_message(TASK_ENB_APP, S1AP_REGISTER_ENB_REQ);
s1ap_register_eNB = &message_p->ittiMsg.s1ap_register_enb_req;
hash = s1ap_generate_eNB_id();
/* Some default/random parameters */
s1ap_register_eNB->eNB_id = eNB_id + (hash & 0xFFFF8);
s1ap_register_eNB->cell_type = CELL_MACRO_ENB;
s1ap_register_eNB->tac = 0;
s1ap_register_eNB->mcc = 208;
s1ap_register_eNB->mnc = 34;
s1ap_register_eNB->default_drx = PAGING_DRX_256;
s1ap_register_eNB->nb_mme = 1;
s1ap_register_eNB->mme_ip_address[0].ipv4 = 1;
s1ap_register_eNB->mme_ip_address[0].ipv6 = 0;
memcpy(s1ap_register_eNB->mme_ip_address[0].ipv4_address, mme_address_v4,
strlen(mme_address_v4));
memcpy(s1ap_register_eNB->mme_ip_address[0].ipv6_address, mme_address_v6,
strlen(mme_address_v6));
itti_send_msg_to_task(TASK_S1AP, eNB_id, message_p);
itti_mark_task_ready (TASK_ENB_APP); // at the end of init for the current task
do {
// Checks if a message has been sent to L2L1 task
itti_receive_msg (TASK_ENB_APP, &message_p);
if (message_p != NULL) {
switch (ITTI_MSG_ID(message_p)) {
case TERMINATE_MESSAGE:
itti_exit_task ();
break;
case MESSAGE_TEST:
LOG_D(EMU, "Received %s\n", ITTI_MSG_NAME(message_p));
break;
default:
LOG_E(EMU, "Received unexpected message %s\n", ITTI_MSG_NAME(message_p));
break;
}
free (message_p);
}
} while(1);
#endif
return NULL;
}
int main(int argc, char **argv) { int main(int argc, char **argv) {
#ifdef RTAI #ifdef RTAI
RT_TASK *task; // RT_TASK *task;
#endif #endif
int i,j,aa; int i,j,aa;
#if defined (XFORMS) || defined (EMOS) || (! defined (RTAI))
void *status; void *status;
#endif
/* /*
u32 rf_mode_max[4] = {55759,55759,55759,55759}; u32 rf_mode_max[4] = {55759,55759,55759,55759};
...@@ -1033,16 +1061,21 @@ int main(int argc, char **argv) { ...@@ -1033,16 +1061,21 @@ int main(int argc, char **argv) {
u16 Nid_cell = 0; u16 Nid_cell = 0;
u8 cooperation_flag=0, transmission_mode=1, abstraction_flag=0; u8 cooperation_flag=0, transmission_mode=1, abstraction_flag=0;
#ifndef OPENAIR2
u8 beta_ACK=0,beta_RI=0,beta_CQI=2; u8 beta_ACK=0,beta_RI=0,beta_CQI=2;
#endif
int c; int c;
#ifdef XFORMS
char do_forms=0; char do_forms=0;
unsigned int fd; #endif
#ifdef ENABLE_TCXO
unsigned int tcxo = 114; unsigned int tcxo = 114;
#endif
int amp; int amp;
u8 prach_fmt; // u8 prach_fmt;
int N_ZC; // int N_ZC;
char rxg_fname[100]; char rxg_fname[100];
char txg_fname[100]; char txg_fname[100];
...@@ -1060,7 +1093,9 @@ int main(int argc, char **argv) { ...@@ -1060,7 +1093,9 @@ int main(int argc, char **argv) {
int ret, ant; int ret, ant;
int ant_offset=0; int ant_offset=0;
#if defined (EMOS) || (! defined (RTAI))
int error_code; int error_code;
#endif
char *itti_dump_file = NULL; char *itti_dump_file = NULL;
const struct option long_options[] = { const struct option long_options[] = {
...@@ -1082,7 +1117,9 @@ int main(int argc, char **argv) { ...@@ -1082,7 +1117,9 @@ int main(int argc, char **argv) {
ouput_vcd = 1; ouput_vcd = 1;
break; break;
case 'd': case 'd':
#ifdef XFORMS
do_forms=1; do_forms=1;
#endif
break; break;