Commit 761a77fa authored by Raymond Knopp's avatar Raymond Knopp

Merge branch 'RU-RAU-split' of https://gitlab.eurecom.fr/oai/openairinterface5g into RU-RAU-split

parents 5fefa112 6087ede0
...@@ -312,11 +312,11 @@ if (NOT ${ret} STREQUAL 0) ...@@ -312,11 +312,11 @@ if (NOT ${ret} STREQUAL 0)
message(FATAL_ERROR "${fix_asn1c_call}: error") message(FATAL_ERROR "${fix_asn1c_call}: error")
endif (NOT ${ret} STREQUAL 0) endif (NOT ${ret} STREQUAL 0)
file(GLOB rrc_source ${RRC_FULL_DIR}/*.c) file(GLOB rrc_source ${RRC_FULL_DIR}/*.c)
set(rrc_source ${rrc_source} ${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1_msg.c)
file(GLOB rrc_h ${RRC_FULL_DIR}/*.h) file(GLOB rrc_h ${RRC_FULL_DIR}/*.h)
set(rrc_h ${rrc_h} ${RRC_FULL_DIR}/asn1_constants.h) set(rrc_h ${rrc_h} ${RRC_FULL_DIR}/asn1_constants.h)
set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code set_source_files_properties(${rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
add_library(RRC_LIB ${rrc_h} ${rrc_source}) add_library(RRC_LIB ${rrc_h} ${rrc_source}
${OPENAIR2_DIR}/RRC/LITE/MESSAGES/asn1_msg.c)
include_directories ("${RRC_FULL_DIR}") include_directories ("${RRC_FULL_DIR}")
# add the command to generate the source code # add the command to generate the source code
......
...@@ -65,7 +65,7 @@ int phy_init_top(LTE_DL_FRAME_PARMS *frame_parms); ...@@ -65,7 +65,7 @@ int phy_init_top(LTE_DL_FRAME_PARMS *frame_parms);
@returns -1 if any memory allocation failed @returns -1 if any memory allocation failed
@note The current implementation will never return -1, but segfault. @note The current implementation will never return -1, but segfault.
*/ */
int phy_init_lte_ue_signal(PHY_VARS_UE *phy_vars_ue, int init_lte_ue_signal(PHY_VARS_UE *phy_vars_ue,
int nb_connected_eNB, int nb_connected_eNB,
uint8_t abstraction_flag); uint8_t abstraction_flag);
......
...@@ -1151,7 +1151,9 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1151,7 +1151,9 @@ void rx_prach0(PHY_VARS_eNB *eNB,
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
int en0=0; int en0=0;
#endif #endif
int en;
(void)frame; /* avoid gcc warnings */
if (ru) { if (ru) {
fp = &ru->frame_parms; fp = &ru->frame_parms;
nb_rx = ru->nb_rx; nb_rx = ru->nb_rx;
...@@ -1472,8 +1474,8 @@ void rx_prach0(PHY_VARS_eNB *eNB, ...@@ -1472,8 +1474,8 @@ void rx_prach0(PHY_VARS_eNB *eNB,
return; return;
} else if (eNB!=NULL) { } else if (eNB!=NULL) {
en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
#ifdef PRACH_DEBUG #ifdef PRACH_DEBUG
int en = dB_fixed(signal_energy((int32_t*)&rxsigF[0][0],840));
if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en); if ((en > 60)&&(br_flag==1)) LOG_I(PHY,"PRACH (br_flag %d,ce_level %d, n_ra_prb %d, k %d): Frame %d, Subframe %d => %d dB\n",br_flag,ce_level,n_ra_prb,k,eNB->proc.frame_rx,eNB->proc.subframe_rx,en);
#endif #endif
......
...@@ -113,7 +113,18 @@ int16_t W3_im[3][6] = {{0 ,0 ,0 }, ...@@ -113,7 +113,18 @@ int16_t W3_im[3][6] = {{0 ,0 ,0 },
{0 ,-28378, 28377} {0 ,-28378, 28377}
}; };
char pucch_format_string[6][20] = {"format 1\0","format 1a\0","format 1b\0","format 2\0","format 2a\0","format 2b\0"}; char *pucch_format_string[] = {
"format 1",
"format 1a",
"format 1b",
"pucch_format1b_csA2",
"pucch_format1b_csA3",
"pucch_format1b_csA4",
"format 2",
"format 2a",
"format 2b",
"pucch_format3"
};
/* PUCCH format3 >> */ /* PUCCH format3 >> */
#define D_I 0 #define D_I 0
......
...@@ -555,7 +555,6 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -555,7 +555,6 @@ void prach_procedures(PHY_VARS_eNB *eNB,
uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4]; uint16_t max_preamble[4],max_preamble_energy[4],max_preamble_delay[4];
uint16_t i; uint16_t i;
int frame,subframe; int frame,subframe;
LTE_eNB_PRACH *prach_vars=NULL;
#ifdef Rel14 #ifdef Rel14
if (br_flag==1) { if (br_flag==1) {
...@@ -618,8 +617,6 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -618,8 +617,6 @@ void prach_procedures(PHY_VARS_eNB *eNB,
#ifdef Rel14 #ifdef Rel14
if (br_flag==1) { if (br_flag==1) {
prach_vars = &eNB->prach_vars_br;
int prach_mask; int prach_mask;
prach_mask = is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br); prach_mask = is_prach_subframe(&eNB->frame_parms,eNB->proc.frame_prach_br,eNB->proc.subframe_prach_br);
...@@ -679,9 +676,6 @@ void prach_procedures(PHY_VARS_eNB *eNB, ...@@ -679,9 +676,6 @@ void prach_procedures(PHY_VARS_eNB *eNB,
T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe), T(T_ENB_PHY_INITIATE_RA_PROCEDURE, T_INT(eNB->Mod_id), T_INT(frame), T_INT(subframe),
T_INT(max_preamble[0]), T_INT(max_preamble_energy[0]), T_INT(max_preamble_delay[0])); T_INT(max_preamble[0]), T_INT(max_preamble_energy[0]), T_INT(max_preamble_delay[0]));
prach_vars = &eNB->prach_vars;
pthread_mutex_lock(&eNB->UL_INFO_mutex); pthread_mutex_lock(&eNB->UL_INFO_mutex);
eNB->UL_INFO.rach_ind.number_of_preambles = 1; eNB->UL_INFO.rach_ind.number_of_preambles = 1;
......
...@@ -69,11 +69,9 @@ void feptx0(RU_t *ru,int slot) { ...@@ -69,11 +69,9 @@ void feptx0(RU_t *ru,int slot) {
//int dummy_tx_b[7680*2] __attribute__((aligned(32))); //int dummy_tx_b[7680*2] __attribute__((aligned(32)));
unsigned int aa,slot_offset; unsigned int aa,slot_offset;
int i,j, tx_offset; int i, tx_offset;
int slot_sizeF = (fp->ofdm_symbol_size)* int slot_sizeF = (fp->ofdm_symbol_size)*
((fp->Ncp==1) ? 6 : 7); ((fp->Ncp==1) ? 6 : 7);
int len,len2;
int16_t *txdata;
int subframe = ru->proc.subframe_tx; int subframe = ru->proc.subframe_tx;
slot_offset = subframe*fp->samples_per_tti + (slot*(fp->samples_per_tti>>1)); slot_offset = subframe*fp->samples_per_tti + (slot*(fp->samples_per_tti>>1));
......
...@@ -211,19 +211,11 @@ static void configure_rrc(uint32_t enb_id) ...@@ -211,19 +211,11 @@ static void configure_rrc(uint32_t enb_id)
static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, const Enb_properties_array_t *enb_properties) static uint32_t eNB_app_register(uint32_t enb_id_start, uint32_t enb_id_end)//, const Enb_properties_array_t *enb_properties)
{ {
uint32_t enb_id; uint32_t enb_id;
uint32_t mme_id;
MessageDef *msg_p; MessageDef *msg_p;
uint32_t register_enb_pending = 0; uint32_t register_enb_pending = 0;
char *str = NULL;
struct in_addr addr;
# if defined(OAI_EMU)
# endif
for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) { for (enb_id = enb_id_start; (enb_id < enb_id_end) ; enb_id++) {
# if defined(OAI_EMU) # if defined(OAI_EMU)
if (oai_emulation.info.cli_start_enb[enb_id] == 1) if (oai_emulation.info.cli_start_enb[enb_id] == 1)
# endif # endif
{ {
...@@ -307,7 +299,6 @@ void *eNB_app_task(void *args_p) ...@@ -307,7 +299,6 @@ void *eNB_app_task(void *args_p)
const char *msg_name = NULL; const char *msg_name = NULL;
instance_t instance; instance_t instance;
int result; int result;
int j;
/* for no gcc warnings */ /* for no gcc warnings */
(void)instance; (void)instance;
......
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
#else #else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h" #include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#endif #endif
#include "intertask_interface_types.h"
#include "RRC/LITE/defs.h"
#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\ #define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
struct in_addr inp;\ struct in_addr inp;\
...@@ -100,5 +102,8 @@ extern void RCConfig(void); ...@@ -100,5 +102,8 @@ extern void RCConfig(void);
void enb_config_display(void); void enb_config_display(void);
void ru_config_display(void); void ru_config_display(void);
int RCconfig_RRC(MessageDef *msg_p, uint32_t i, eNB_RRC_INST *rrc);
int RCconfig_S1(MessageDef *msg_p, uint32_t i);
#endif /* ENB_CONFIG_H_ */ #endif /* ENB_CONFIG_H_ */
/** @} */ /** @} */
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "COMMON/platform_types.h" #include "COMMON/platform_types.h"
#include "COMMON/platform_constants.h" #include "COMMON/platform_constants.h"
#include "SCHED/defs.h"
#include "SystemInformationBlockType2.h" #include "SystemInformationBlockType2.h"
//#include "RadioResourceConfigCommonSIB.h" //#include "RadioResourceConfigCommonSIB.h"
#include "RadioResourceConfigDedicated.h" #include "RadioResourceConfigDedicated.h"
...@@ -710,8 +711,6 @@ rrc_mac_config_req_ue( ...@@ -710,8 +711,6 @@ rrc_mac_config_req_ue(
int i; int i;
int UE_id = -1;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RRC_MAC_CONFIG, VCD_FUNCTION_IN);
LOG_I(MAC,"[CONFIG][UE %d] Configuring MAC/PHY from eNB %d\n",Mod_idP,eNB_index); LOG_I(MAC,"[CONFIG][UE %d] Configuring MAC/PHY from eNB %d\n",Mod_idP,eNB_index);
......
...@@ -3605,9 +3605,9 @@ void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, sub_frame_t ...@@ -3605,9 +3605,9 @@ void SR_indication(module_id_t mod_idP, int cc_idP, frame_t frameP, sub_frame_t
if (mac_eNB_get_rrc_status(mod_idP,UE_RNTI(mod_idP,UE_id)) < RRC_CONNECTED) if (mac_eNB_get_rrc_status(mod_idP,UE_RNTI(mod_idP,UE_id)) < RRC_CONNECTED)
LOG_D(MAC,"[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d\n",mod_idP,rntiP,frameP,subframeP, UE_id,cc_idP); LOG_D(MAC,"[eNB %d][SR %x] Frame %d subframeP %d Signaling SR for UE %d on CC_id %d\n",mod_idP,rntiP,frameP,subframeP, UE_id,cc_idP);
#if 0
UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id]; UE_sched_ctrl *sched_ctl = &UE_list->UE_sched_ctrl[UE_id];
#if 0
/* for the moment don't use ul_cqi from SR, value is too different from harq */ /* for the moment don't use ul_cqi from SR, value is too different from harq */
sched_ctl->pucch1_snr[cc_idP] = ul_cqi; sched_ctl->pucch1_snr[cc_idP] = ul_cqi;
sched_ctl->pucch1_cqi_update[cc_idP] = 1; sched_ctl->pucch1_cqi_update[cc_idP] = 1;
......
...@@ -854,7 +854,6 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -854,7 +854,6 @@ void schedule_ulsch_rnti(module_id_t module_idP,
UE_list_t *UE_list=&eNB->UE_list; UE_list_t *UE_list=&eNB->UE_list;
UE_TEMPLATE *UE_template; UE_TEMPLATE *UE_template;
UE_sched_ctrl *UE_sched_ctrl; UE_sched_ctrl *UE_sched_ctrl;
int tmode;
int sched_frame=frameP; int sched_frame=frameP;
int rvidx_tab[4] = {0,2,3,1}; int rvidx_tab[4] = {0,2,3,1};
...@@ -863,13 +862,8 @@ void schedule_ulsch_rnti(module_id_t module_idP, ...@@ -863,13 +862,8 @@ void schedule_ulsch_rnti(module_id_t module_idP,
nfapi_hi_dci0_request_body_t *hi_dci0_req = &eNB->HI_DCI0_req[CC_id].hi_dci0_request_body; nfapi_hi_dci0_request_body_t *hi_dci0_req = &eNB->HI_DCI0_req[CC_id].hi_dci0_request_body;
nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu; nfapi_hi_dci0_request_pdu_t *hi_dci0_pdu;
nfapi_ul_config_request_pdu_t *ul_config_pdu;
nfapi_ul_config_request_body_t *ul_req_tmp = &eNB->UL_req_tmp[CC_id][sched_subframeP].ul_config_request_body; nfapi_ul_config_request_body_t *ul_req_tmp = &eNB->UL_req_tmp[CC_id][sched_subframeP].ul_config_request_body;
ul_config_pdu = &ul_req_tmp->ul_config_pdu_list[0];
LOG_D(MAC,"entering ulsch preprocesor\n"); LOG_D(MAC,"entering ulsch preprocesor\n");
ulsch_scheduler_pre_processor(module_idP, ulsch_scheduler_pre_processor(module_idP,
frameP, frameP,
......
...@@ -1058,7 +1058,11 @@ int narrowband_to_first_rb(COMMON_channels_t *cc, int nb_index); ...@@ -1058,7 +1058,11 @@ int narrowband_to_first_rb(COMMON_channels_t *cc, int nb_index);
int l2_init_eNB(void); int l2_init_eNB(void);
void Msg1_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
void Msg3_transmitted(module_id_t module_idP,uint8_t CC_id,frame_t frameP, uint8_t eNB_id);
uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn);
int32_t get_uldl_offset(int eutra_bandP);
int l2_init_ue(int eMBMS_active, char *uecap_xer,uint8_t cba_group_active, uint8_t HO_active);
#endif #endif
/** @}*/ /** @}*/
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "proto.h" #include "proto.h"
#include "UTIL/LOG/vcd_signal_dumper.h" #include "UTIL/LOG/vcd_signal_dumper.h"
#include "PHY_INTERFACE/extern.h" #include "PHY_INTERFACE/extern.h"
#include "SCHED/defs.h"
#include "COMMON/mac_rrc_primitives.h" #include "COMMON/mac_rrc_primitives.h"
#include "RRC/LITE/extern.h" #include "RRC/LITE/extern.h"
#include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h" #include "RRC/L2_INTERFACE/openair_rrc_L2_interface.h"
......
...@@ -89,6 +89,7 @@ extern Packet_OTG_List_t *otg_pdcp_buffer; ...@@ -89,6 +89,7 @@ extern Packet_OTG_List_t *otg_pdcp_buffer;
#if defined(LINK_ENB_PDCP_TO_GTPV1U) #if defined(LINK_ENB_PDCP_TO_GTPV1U)
# include "gtpv1u_eNB_task.h" # include "gtpv1u_eNB_task.h"
# include "gtpv1u_eNB_defs.h"
#endif #endif
/* Prevent de-queueing the same PDCP SDU from the queue twice /* Prevent de-queueing the same PDCP SDU from the queue twice
......
...@@ -79,9 +79,9 @@ void config_req_rlc_um ( ...@@ -79,9 +79,9 @@ void config_req_rlc_um (
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#if defined(Rel14) #if defined(Rel14)
const uint32_t const t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600}; const uint32_t t_Reordering_tab[32] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200,1600};
#else #else
const uint32_t const t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200}; const uint32_t t_Reordering_tab[T_Reordering_spare1] = {0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,110,120,130,140,150,160,170,180,190,200};
#endif #endif
void config_req_rlc_um_asn1 ( void config_req_rlc_um_asn1 (
......
...@@ -158,11 +158,11 @@ int xer_sprint (char *string, size_t string_size, asn_TYPE_descriptor_t *td, voi ...@@ -158,11 +158,11 @@ int xer_sprint (char *string, size_t string_size, asn_TYPE_descriptor_t *td, voi
er = xer_encode(td, sptr, XER_F_BASIC, xer__print2s, &string_buffer); er = xer_encode(td, sptr, XER_F_BASIC, xer__print2s, &string_buffer);
if (er.encoded < 0) { if (er.encoded < 0) {
LOG_E(RRC, "xer_sprint encoding error (%d)!", er.encoded); LOG_E(RRC, "xer_sprint encoding error (%zd)!", er.encoded);
er.encoded = string_buffer.string_size; er.encoded = string_buffer.string_size;
} else { } else {
if (er.encoded > string_buffer.string_size) { if (er.encoded > string_buffer.string_size) {
LOG_E(RRC, "xer_sprint string buffer too small, got %d need %d!", string_buffer.string_size, er.encoded); LOG_E(RRC, "xer_sprint string buffer too small, got %zd need %zd!", string_buffer.string_size, er.encoded);
er.encoded = string_buffer.string_size; er.encoded = string_buffer.string_size;
} }
} }
...@@ -484,7 +484,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier, ...@@ -484,7 +484,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[eNB] SystemInformationBlockType1 Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"[eNB] SystemInformationBlockType1 Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
if (enc_rval.encoded==-1) { if (enc_rval.encoded==-1) {
...@@ -1014,7 +1014,7 @@ uint8_t do_SIB23(uint8_t Mod_id, ...@@ -1014,7 +1014,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[eNB] SystemInformation Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"[eNB] SystemInformation Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
if (enc_rval.encoded==-1) { if (enc_rval.encoded==-1) {
...@@ -1103,7 +1103,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) ...@@ -1103,7 +1103,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %d bits (%d bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); LOG_D(RRC,"[UE] RRCConnectionRequest Encoded %zd bits (%zd bytes), ecause %d\n",enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
#endif #endif
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
...@@ -1186,7 +1186,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin ...@@ -1186,7 +1186,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"RRCConnectionSetupComplete Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"RRCConnectionSetupComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
...@@ -1248,7 +1248,7 @@ do_RRCConnectionReconfigurationComplete( ...@@ -1248,7 +1248,7 @@ do_RRCConnectionReconfigurationComplete(
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"RRCConnectionReconfigurationComplete Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
return((enc_rval.encoded+7)/8); return((enc_rval.encoded+7)/8);
...@@ -1468,7 +1468,7 @@ do_RRCConnectionSetup( ...@@ -1468,7 +1468,7 @@ do_RRCConnectionSetup(
if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present
== SoundingRS_UL_ConfigCommon_PR_setup) == SoundingRS_UL_ConfigCommon_PR_setup)
if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=0) if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=0)
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %d. Expect undefined behaviour!\n", LOG_W(RRC,"This code has been optimized for SRS Subframe Config 0, but current config is %zd. Expect undefined behaviour!\n",
carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig); carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig);
if (ue_context_pP->local_uid >=20) if (ue_context_pP->local_uid >=20)
LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n", LOG_W(RRC,"This code has been optimized for up to 10 UEs, but current UE_id is %d. Expect undefined behaviour!\n",
...@@ -1481,7 +1481,7 @@ do_RRCConnectionSetup( ...@@ -1481,7 +1481,7 @@ do_RRCConnectionSetup(
if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.present
== SoundingRS_UL_ConfigCommon_PR_setup) == SoundingRS_UL_ConfigCommon_PR_setup)
if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=7) { if (carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig!=7) {
LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %d and %d. Expect undefined behaviour!\n", LOG_W(RRC,"This code has been optimized for SRS Subframe Config 7 and TDD config 3, but current configs are %zd and %zd. Expect undefined behaviour!\n",
carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig, carrier->sib2->radioResourceConfigCommon.soundingRS_UL_ConfigCommon.choice.setup.srs_SubframeConfig,
carrier->sib1->tdd_Config->subframeAssignment); carrier->sib1->tdd_Config->subframeAssignment);
} }
...@@ -1491,7 +1491,7 @@ do_RRCConnectionSetup( ...@@ -1491,7 +1491,7 @@ do_RRCConnectionSetup(
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=17+ue_context_pP->local_uid/2; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex=17+ue_context_pP->local_uid/2;
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2; physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb= ue_context_pP->local_uid%2;
} }
LOG_W(RRC,"local UID %d, srs ConfigIndex %d, TransmissionComb %d\n",ue_context_pP->local_uid, LOG_W(RRC,"local UID %d, srs ConfigIndex %zd, TransmissionComb %zd\n",ue_context_pP->local_uid,
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex, physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.srs_ConfigIndex,
physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb); physicalConfigDedicated2->soundingRS_UL_ConfigDedicated->choice.setup.transmissionComb);
...@@ -1637,7 +1637,7 @@ do_RRCConnectionSetup( ...@@ -1637,7 +1637,7 @@ do_RRCConnectionSetup(
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"RRCConnectionSetup Encoded %d bits (%d bytes), ecause %d\n", LOG_D(RRC,"RRCConnectionSetup Encoded %zd bits (%zd bytes), ecause %d\n",
enc_rval.encoded,(enc_rval.encoded+7)/8,ecause); enc_rval.encoded,(enc_rval.encoded+7)/8,ecause);
#endif #endif
...@@ -1710,7 +1710,7 @@ do_SecurityModeCommand( ...@@ -1710,7 +1710,7 @@ do_SecurityModeCommand(
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %d bits (%d bytes)\n", LOG_D(RRC,"[eNB %d] securityModeCommand for UE %x Encoded %zd bits (%zd bytes)\n",
ctxt_pP->module_id, ctxt_pP->module_id,
ctxt_pP->rnti, ctxt_pP->rnti,
enc_rval.encoded, enc_rval.encoded,
...@@ -1788,7 +1788,7 @@ do_UECapabilityEnquiry( ...@@ -1788,7 +1788,7 @@ do_UECapabilityEnquiry(
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %d bits (%d bytes)\n", LOG_D(RRC,"[eNB %d] UECapabilityRequest for UE %x Encoded %zd bits (%zd bytes)\n",
ctxt_pP->module_id, ctxt_pP->module_id,
ctxt_pP->rnti, ctxt_pP->rnti,
enc_rval.encoded, enc_rval.encoded,
...@@ -1927,7 +1927,7 @@ do_RRCConnectionReconfiguration( ...@@ -1927,7 +1927,7 @@ do_RRCConnectionReconfiguration(
(void*)&dl_dcch_msg, (void*)&dl_dcch_msg,
buffer, buffer,
RRC_BUF_SIZE); RRC_BUF_SIZE);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %l)!\n", AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %zd)!\n",
enc_rval.failed_type->name, enc_rval.encoded); enc_rval.failed_type->name, enc_rval.encoded);
#ifdef XER_PRINT #ifdef XER_PRINT
...@@ -1954,7 +1954,7 @@ do_RRCConnectionReconfiguration( ...@@ -1954,7 +1954,7 @@ do_RRCConnectionReconfiguration(
#endif #endif
//#ifdef USER_MODE //#ifdef USER_MODE
LOG_I(RRC,"RRCConnectionReconfiguration Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_I(RRC,"RRCConnectionReconfiguration Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
// for (i=0;i<30;i++) // for (i=0;i<30;i++)
// msg("%x.",buffer[i]); // msg("%x.",buffer[i]);
// msg("\n"); // msg("\n");
...@@ -2015,7 +2015,7 @@ do_RRCConnectionReestablishmentReject( ...@@ -2015,7 +2015,7 @@ do_RRCConnectionReestablishmentReject(
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %d bits (%d bytes)\n", LOG_D(RRC,"RRCConnectionReestablishmentReject Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8); enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
...@@ -2076,7 +2076,7 @@ do_RRCConnectionReject( ...@@ -2076,7 +2076,7 @@ do_RRCConnectionReject(
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"RRCConnectionReject Encoded %d bits (%d bytes)\n", LOG_D(RRC,"RRCConnectionReject Encoded %zd bits (%zd bytes)\n",
enc_rval.encoded,(enc_rval.encoded+7)/8); enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
...@@ -2267,7 +2267,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id, ...@@ -2267,7 +2267,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
#endif #endif
#ifdef USER_MODE #ifdef USER_MODE
LOG_D(RRC,"[eNB] MCCH Message Encoded %d bits (%d bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8); LOG_D(RRC,"[eNB] MCCH Message Encoded %zd bits (%zd bytes)\n",enc_rval.encoded,(enc_rval.encoded+7)/8);
#endif #endif
if (enc_rval.encoded==-1) { if (enc_rval.encoded==-1) {
...@@ -2490,7 +2490,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) ...@@ -2490,7 +2490,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
char UE_EUTRA_Capability_xer[8192]; char UE_EUTRA_Capability_xer[8192];
size_t size; size_t size;
LOG_I(RRC,"Allocating %u bytes for UE_EUTRA_Capability\n",sizeof(*UE_EUTRA_Capability)); LOG_I(RRC,"Allocating %zu bytes for UE_EUTRA_Capability\n",sizeof(*UE_EUTRA_Capability));
UE_EUTRA_Capability = CALLOC(1, sizeof(*UE_EUTRA_Capability)); UE_EUTRA_Capability = CALLOC(1, sizeof(*UE_EUTRA_Capability));
...@@ -2577,18 +2577,17 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) ...@@ -2577,18 +2577,17 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
// UE_EUTRA_Capability->measParameters.bandListEUTRA.list.count = 0; // no measurements on other bands // UE_EUTRA_Capability->measParameters.bandListEUTRA.list.count = 0; // no measurements on other bands
// UE_EUTRA_Capability->featureGroupIndicators // null // UE_EUTRA_Capability->featureGroupIndicators // null
// featureGroup is mandatory for CMW tests
// featureGroup is filled only for usim-test mode
BIT_STRING_t *bit_string;
uint32_t featrG;
bit_string = CALLOC(1, sizeof(*bit_string));
featrG = 0x04000800;
if(usim_test == 1) if(usim_test == 1)
{ {
bit_string->buf = &featrG; // featureGroup is mandatory for CMW tests
bit_string->size = 4; // featureGroup is filled only for usim-test mode
bit_string->bits_unused = 0; BIT_STRING_t *bit_string = CALLOC(1, sizeof(*bit_string));
UE_EUTRA_Capability->featureGroupIndicators = bit_string; char featrG[4] = { 0x00, 0x08, 0x00, 0x04 };
bit_string->buf = CALLOC(1, 4);
memcpy(bit_string->buf, featrG, 4);
bit_string->size = 4;
bit_string->bits_unused = 0;
UE_EUTRA_Capability->featureGroupIndicators = bit_string;
} }
// UE_EUTRA_Capability->interRAT_Parameters // null // UE_EUTRA_Capability->interRAT_Parameters // null
...@@ -2649,7 +2648,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) ...@@ -2649,7 +2648,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
#endif #endif
UECapability.sdu_size = (enc_rval.encoded + 7) / 8; UECapability.sdu_size = (enc_rval.encoded + 7) / 8;
LOG_I(PHY, "[RRC]UE Capability encoded, %d bytes (%d bits)\n", LOG_I(PHY, "[RRC]UE Capability encoded, %d bytes (%zd bits)\n",
UECapability.sdu_size, enc_rval.encoded + 7); UECapability.sdu_size, enc_rval.encoded + 7);
{ {
char *sdu; char *sdu;
......
...@@ -462,4 +462,12 @@ long binary_search_int(int elements[], long numElem, int value); ...@@ -462,4 +462,12 @@ long binary_search_int(int elements[], long numElem, int value);
long binary_search_float(float elements[], long numElem, float value); long binary_search_float(float elements[], long numElem, float value);
void openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active); void openair_rrc_top_init_eNB(int eMBMS_active,uint8_t HO_active);
void openair_rrc_top_init_ue(
int eMBMS_active,
char* uecap_xer,
uint8_t cba_group_active,
uint8_t HO_active
);
/** @}*/ /** @}*/
...@@ -2604,7 +2604,7 @@ static const char* SIB2mac_ContentionResolutionTimer( long value ) ...@@ -2604,7 +2604,7 @@ static const char* SIB2mac_ContentionResolutionTimer( long value )
} }
static const char* SIB2modificationPeriodCoeff( long value ) static const char* SIB2modificationPeriodCoeff( long value )
{ {
static char temp[4] = {0}; static char temp[32] = {0};
if (value < 0 || value > 3) if (value < 0 || value > 3)
return "ERR"; return "ERR";
...@@ -2614,7 +2614,7 @@ static const char* SIB2modificationPeriodCoeff( long value ) ...@@ -2614,7 +2614,7 @@ static const char* SIB2modificationPeriodCoeff( long value )
} }
static const char* SIB2defaultPagingCycle( long value ) static const char* SIB2defaultPagingCycle( long value )
{ {
static char temp[6] = {0}; static char temp[32] = {0};
if (value < 0 || value > 3) if (value < 0 || value > 3)
return "ERR"; return "ERR";
......
...@@ -215,7 +215,7 @@ int cli_login(const char *username, int maxnodes, int maxcmds) ...@@ -215,7 +215,7 @@ int cli_login(const char *username, int maxnodes, int maxcmds)
char *cli_prompt(void) char *cli_prompt(void)
{ {
static char promptstr[200]; static char promptstr[256];
promptstr[0]='\0'; promptstr[0]='\0';
snprintf(promptstr, 200,"%s@%s",username, cli_cfg->prompt); snprintf(promptstr, 200,"%s@%s",username, cli_cfg->prompt);
return promptstr; return promptstr;
......
...@@ -103,7 +103,7 @@ int prompt (char *arg) ...@@ -103,7 +103,7 @@ int prompt (char *arg)
return 0; return 0;
if (!arg || !*arg) { // no arg is provided, run get func if (!arg || !*arg) { // no arg is provided, run get func
snprintf(buffer,200,"%s\n", cli_cfg->prompt); snprintf(buffer,256,"%s\n", cli_cfg->prompt);
send(cli_cfg->cfd, buffer, strlen(buffer), 0); send(cli_cfg->cfd, buffer, strlen(buffer), 0);
// send(cli_cfg->cfd, cli_cfg->prompt, strlen(cli_cfg->prompt), 0); // send(cli_cfg->cfd, cli_cfg->prompt, strlen(cli_cfg->prompt), 0);
} else {// set func } else {// set func
......
...@@ -48,10 +48,11 @@ extern unsigned char NB_UE_INST; ...@@ -48,10 +48,11 @@ extern unsigned char NB_UE_INST;
//#include "LAYER2/MAC/extern.h" //#include "LAYER2/MAC/extern.h"
#undef MAX
#define MAX(x,y) ((x)>(y)?(x):(y)) #define MAX(x,y) ((x)>(y)?(x):(y))
#undef MIN
#define MIN(x,y) ((x)<(y)?(x):(y)) #define MIN(x,y) ((x)<(y)?(x):(y))
// Check if the packet is well received or not and extract data // Check if the packet is well received or not and extract data
int otg_rx_pkt(const int dst_instanceP, const int ctime, const char * const buffer_tx, const unsigned int size) int otg_rx_pkt(const int dst_instanceP, const int ctime, const char * const buffer_tx, const unsigned int size)
{ {
......
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
#ifndef GTPV1U_ENB_DEFS_H_ #ifndef GTPV1U_ENB_DEFS_H_
#define GTPV1U_ENB_DEFS_H_ #define GTPV1U_ENB_DEFS_H_
#include "NwGtpv1u.h"
#define GTPV1U_UDP_PORT (2152) #define GTPV1U_UDP_PORT (2152)
#define GTPV1U_BEARER_OFFSET 3 #define GTPV1U_BEARER_OFFSET 3
......
...@@ -198,9 +198,9 @@ extern int T_dont_fork; ...@@ -198,9 +198,9 @@ extern int T_dont_fork;
/* optname helpstr paramflags XXXptr defXXXval type numelt */ /* optname helpstr paramflags XXXptr defXXXval type numelt */
/*------------------------------------------------------------------------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------------------------------------------------------------------*/
#define CMDLINE_TTRACEPARAMS_DESC { \ #define CMDLINE_TTRACEPARAMS_DESC { \
{"T_port", CONFIG_HLP_TPORT, 0, uptr:&T_port, defuintval:0, TYPE_UINT, 0}, \ {"T_port", CONFIG_HLP_TPORT, 0, iptr:&T_port, defintval:0, TYPE_INT, 0}, \
{"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, uptr:&T_nowait, defuintval:0, TYPE_UINT, 0}, \ {"T_nowait", CONFIG_HLP_NOTWAIT, PARAMFLAG_BOOL, iptr:&T_nowait, defintval:0, TYPE_INT, 0}, \
{"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, uptr:&T_dont_fork, defuintval:1, TYPE_UINT, 0}, \ {"T_dont_fork", CONFIG_HLP_TNOFORK, PARAMFLAG_BOOL, iptr:&T_dont_fork, defintval:1, TYPE_INT, 0}, \
} }
...@@ -259,4 +259,9 @@ extern void init_fep_thread(PHY_VARS_eNB *, pthread_attr_t *); ...@@ -259,4 +259,9 @@ extern void init_fep_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *); extern void init_td_thread(PHY_VARS_eNB *, pthread_attr_t *);
extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *); extern void init_te_thread(PHY_VARS_eNB *, pthread_attr_t *);
PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t UE_id,
uint8_t abstraction_flag);
void init_eNB_afterRU(void);
#endif #endif
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
#include <sys/sysinfo.h> #include <sys/sysinfo.h>
#include "rt_wrapper.h" #include "rt_wrapper.h"
#include "openair1/PHY/defs.h"
static int latency_target_fd = -1; static int latency_target_fd = -1;
static int32_t latency_target_value = 0; static int32_t latency_target_value = 0;
/* Latency trick - taken from cyclictest.c /* Latency trick - taken from cyclictest.c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment