From 53a31093fa1e18c3f23c8c2fd71bf3e27377965e Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Wed, 8 Aug 2018 05:01:21 +0200 Subject: [PATCH] minor modifications to lte-ru.c and ru_control.c. Addition of lte_noS1_buildCMakelists.template which somehow got removed. --- .../lte_noS1_build_oai/CMakeLists.template | 10 +++ targets/RT/USER/lte-ru.c | 63 ++++++++++--------- targets/RT/USER/ru_control.c | 2 - 3 files changed, 42 insertions(+), 33 deletions(-) create mode 100644 cmake_targets/lte_noS1_build_oai/CMakeLists.template diff --git a/cmake_targets/lte_noS1_build_oai/CMakeLists.template b/cmake_targets/lte_noS1_build_oai/CMakeLists.template new file mode 100644 index 0000000000..95216b139e --- /dev/null +++ b/cmake_targets/lte_noS1_build_oai/CMakeLists.template @@ -0,0 +1,10 @@ +set(ENABLE_ITTI True) +set(ENABLE_USE_MME False) +set(PDCP_USE_NETLINK True) +set(LINK_ENB_PDCP_TO_IP_DRIVER True) +set(LINK_ENB_PDCP_TO_GTPV1U False) +set(PDCP_USE_NETLINK_QUEUES False) +set(LINUX True) +set(SECU False) +set(NAS_UE False) + diff --git a/targets/RT/USER/lte-ru.c b/targets/RT/USER/lte-ru.c index 65bd11d67d..0aca53f10f 100644 --- a/targets/RT/USER/lte-ru.c +++ b/targets/RT/USER/lte-ru.c @@ -1558,34 +1558,34 @@ static void* ru_thread( void* param ) { } else if (ru->has_ctrl_prt == 0){ - // There is no control port: start everything here - LOG_I(PHY, "RU %d has not ctrl port\n",ru->idx); - if (ru->if_south == LOCAL_RF){ - fill_rf_config(ru,ru->rf_config_file); - init_frame_parms(&ru->frame_parms,1); - ru->frame_parms.nb_antennas_rx = ru->nb_rx; - phy_init_RU(ru); - - - ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg); - - if (setup_RU_buffers(ru)!=0) { - printf("Exiting, cannot initialize RU Buffers\n"); - exit(-1); - } - pthread_mutex_lock(&RC.ru_mutex); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - pthread_mutex_unlock(&RC.ru_mutex); - } - pthread_mutex_lock(&RC.ru_mutex); - RC.ru_mask &= ~(1<idx); - pthread_cond_signal(&RC.ru_cond); - pthread_mutex_unlock(&RC.ru_mutex); - - ru->state = RU_RUN; - - + // There is no control port: start everything here + LOG_I(PHY, "RU %d has not ctrl port\n",ru->idx); + if (ru->if_south == LOCAL_RF){ + fill_rf_config(ru,ru->rf_config_file); + init_frame_parms(&ru->frame_parms,1); + ru->frame_parms.nb_antennas_rx = ru->nb_rx; + phy_init_RU(ru); + + + ret = openair0_device_load(&ru->rfdevice,&ru->openair0_cfg); + + if (setup_RU_buffers(ru)!=0) { + printf("Exiting, cannot initialize RU Buffers\n"); + exit(-1); + } + pthread_mutex_lock(&RC.ru_mutex); + RC.ru_mask &= ~(1<idx); + pthread_cond_signal(&RC.ru_cond); + pthread_mutex_unlock(&RC.ru_mutex); + } + pthread_mutex_lock(&RC.ru_mutex); + RC.ru_mask &= ~(1<idx); + pthread_cond_signal(&RC.ru_cond); + pthread_mutex_unlock(&RC.ru_mutex); + + ru->state = RU_RUN; + + } pthread_mutex_lock(&proc->mutex_FH1); @@ -1780,7 +1780,7 @@ static void* ru_thread( void* param ) { // do OFDM if needed if ((ru->fh_north_asynch_in == NULL) && (ru->feptx_ofdm)) ru->feptx_ofdm(ru); if(!emulate_rf){ - // do outgoing fronthaul (south) if needed + // do outgoing fronthaul (south) if needed if ((ru->fh_north_asynch_in == NULL) && (ru->fh_south_out)) ru->fh_south_out(ru); if (ru->fh_north_out) ru->fh_north_out(ru); @@ -1797,8 +1797,9 @@ static void* ru_thread( void* param ) { continue; } #endif - } - + } // else wait_cnt == 0 + } // ru->state = RU_RU + } // while !oai_exit printf( "Exiting ru_thread \n"); diff --git a/targets/RT/USER/ru_control.c b/targets/RT/USER/ru_control.c index bc2224cdcd..af837c9dff 100644 --- a/targets/RT/USER/ru_control.c +++ b/targets/RT/USER/ru_control.c @@ -83,11 +83,9 @@ #include "RRC/LTE/rrc_extern.h" #include "PHY_INTERFACE/phy_interface.h" -#include "UTIL/LOG/log_extern.h" #include "UTIL/OTG/otg_tx.h" #include "UTIL/OTG/otg_externs.h" #include "UTIL/MATH/oml.h" -#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/OPT/opt.h" #include "enb_config.h"