Commit b5e7b438 authored by Raphael Defosseux's avatar Raphael Defosseux

Patch provided by Gabriel Arrobo.

Mainly comestics and integer type management
Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 80ace548
......@@ -147,7 +147,7 @@ Options
--uhd-images-dir
Download UHD images in the indicated location
--build-eclipse
Build eclipse project files. Paths are auto corrected by fixprj.sh
Build eclipse project files.
--build-lib <libraries>
Build optional shared library, <libraries> can be one or several of $OPTIONAL_LIBRARIES or \"all\"
--usrp-recplay
......
......@@ -214,7 +214,7 @@ configmodule_interface_t *load_configmodule(int argc,
}
}
/* look for the OAI_CONFIGMODULE environement variable */
/* look for the OAI_CONFIGMODULE environment variable */
if ( cfgparam == NULL ) {
cfgparam = getenv("OAI_CONFIGMODULE");
}
......@@ -265,8 +265,8 @@ configmodule_interface_t *load_configmodule(int argc,
atoken=strtok_r(modeparams,":",&strtokctx);
while ( cfgptr->num_cfgP< CONFIG_MAX_OOPT_PARAMS && atoken != NULL) {
/* look for debug level in the config parameters, it is commom to all config mode
and will be removed frome the parameter array passed to the shared module */
/* look for debug level in the config parameters, it is common to all config mode
and will be removed from the parameter array passed to the shared module */
char *aptr;
aptr=strcasestr(atoken,"dbgl");
......
......@@ -421,6 +421,7 @@ int logInit (void)
register_log_component("FLEXRAN_AGENT","log",FLEXRAN_AGENT);
register_log_component("PROTO_AGENT","log",PROTO_AGENT);
register_log_component("TMR","",TMR);
register_log_component("EMU","log",EMU);
register_log_component("USIM","txt",USIM);
register_log_component("SIM","txt",SIM);
/* following log component are used for the localization*/
......
......@@ -363,7 +363,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
/* LOG globalconfiguration parameters */
/* LOG global configuration parameters */
/* optname help paramflags XXXptr defXXXval type numelt */
/*-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------*/
#define LOG_GLOBALPARAMS_DESC { \
......@@ -385,7 +385,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
// debugging macros
#define LOG_F LOG_I /* because LOG_F was originaly to dump a message or buffer but is also used as a regular level...., to dump use LOG_DUMPMSG */
# if T_TRACER
/* per component, level dependant macros */
/* per component, level dependent macros */
# define LOG_E(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_ERR ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_ERR, x) ;} else { T(T_LEGACY_ ## c ## _ERROR, T_PRINTF(x)) ;}} while (0)
# define LOG_W(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_WARNING) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_WARNING, x) ;} else { T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x)) ;}} while (0)
# define LOG_I(c, x...) do { if (T_stdout) { if( g_log->log_component[c].level >= OAILOG_INFO ) logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ;} else { T(T_LEGACY_ ## c ## _INFO, T_PRINTF(x)) ;}} while (0)
......@@ -394,10 +394,10 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
# define VLOG(c,l, f, args) do { if (T_stdout) { if( g_log->log_component[c].level >= l ) vlogRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, l, f, args) ;} } while (0)
/* macro used to dump a buffer or a message as in openair2/RRC/LTE/RRC_eNB.c, replaces LOG_F macro */
# define LOG_DUMPMSG(c, f, b, s, x...) do { if(g_log->dump_mask & f) log_dump(c, b, s, LOG_DUMP_CHAR, x) ;} while (0) /* */
/* bitmask dependant macros, to isolate debugging code */
/* bitmask dependent macros, to isolate debugging code */
# define LOG_DEBUGFLAG(D) (g_log->debug_mask & D)
/* bitmask dependant macros, to generate debug file such as matlab file or message dump */
/* bitmask dependent macros, to generate debug file such as matlab file or message dump */
# define LOG_DUMPFLAG(D) (g_log->dump_mask & D)
# define LOG_M(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0)/* */
/* define variable only used in LOG macro's */
......@@ -420,7 +420,7 @@ int32_t write_file_matlab(const char *fname, const char *vname, void *data, int
#define GCC_NOTUSED __attribute__((unused))
#define LOG_USEDINLOG_VAR(A,B) GCC_NOTUSED A B
/* unfiltered macros, usefull for simulators or messages at init time, before log is configured */
/* unfiltered macros, useful for simulators or messages at init time, before log is configured */
#define LOG_UM(file, vector, data, len, dec, format) do { write_file_matlab(file, vector, data, len, dec, format);} while(0)
#define LOG_UI(c, x...) do {logRecord_mt(__FILE__, __FUNCTION__, __LINE__,c, OAILOG_INFO, x) ; } while(0)
#define LOG_UDUMPMSG(c, b, s, f, x...) do { log_dump(c, b, s, f, x) ;} while (0) /* */
......
/*
Author: Laurent THOMAS, Open Cells
Copyleft: OpenAirInterface software alliance and it's licence
Copyleft: OpenAirInterface software alliance and it's license
*/
#ifndef INTERTASK_INTERFACE_H_
#define INTERTASK_INTERFACE_H_
......
......@@ -229,7 +229,7 @@ void configure_linux(void) {
if ( (latency_target_fd = open("/dev/cpu_dma_latency", O_RDWR)) != -1 ) {
ret = write(latency_target_fd, &latency_target_value, sizeof(latency_target_value));
if (ret == 0) {
printf("# error setting cpu_dma_latency to %d!: %s\n", latency_target_value, strerror(errno));
printf("# error setting cpu_dma_latency to %u!: %s\n", latency_target_value, strerror(errno));
close(latency_target_fd);
latency_target_fd=-1;
return;
......@@ -237,9 +237,9 @@ void configure_linux(void) {
}
}
if (latency_target_fd != -1)
LOG_I(HW,"# /dev/cpu_dma_latency set to %dus\n", latency_target_value);
LOG_I(HW,"# /dev/cpu_dma_latency set to %u us\n", latency_target_value);
else
LOG_E(HW,"Can't set /dev/cpu_dma_latency to %dus\n", latency_target_value);
LOG_E(HW,"Can't set /dev/cpu_dma_latency to %u us\n", latency_target_value);
// Set CPU frequency to it's maximum
if ( 0 != system("for d in /sys/devices/system/cpu/cpu[0-9]*; do cat $d/cpufreq/cpuinfo_max_freq > $d/cpufreq/scaling_min_freq; done"))
......
......@@ -926,7 +926,7 @@ void init_gNB(int single_thread_flag,int wait_for_sync) {
int CC_id;
int inst;
PHY_VARS_gNB *gNB;
LOG_I(PHY,"[nr-softmodem.c] gNB structure about to allocated RC.nb_nr_L1_inst:%d RC.nb_nr_L1_CC[0]:%d\n",RC.nb_nr_L1_inst,RC.nb_nr_L1_CC[0]);
LOG_I(PHY,"[nr-softmodem.c] gNB structure about to be allocated RC.nb_nr_L1_inst:%d RC.nb_nr_L1_CC[0]:%d\n",RC.nb_nr_L1_inst,RC.nb_nr_L1_CC[0]);
if (RC.gNB == NULL) RC.gNB = (PHY_VARS_gNB ***) malloc(RC.nb_nr_L1_inst*sizeof(PHY_VARS_gNB **));
......
......@@ -992,7 +992,7 @@ void wakeup_gNB_L1s(RU_t *ru) {
if (ru->num_gNB==1 && ru->gNB_top!=0 && get_thread_parallel_conf() == PARALLEL_SINGLE_THREAD) {
// call gNB function directly
char string[20];
sprintf(string,"Incoming RU %d",ru->idx);
sprintf(string,"Incoming RU %u",ru->idx);
LOG_D(PHY,"RU %d Call gNB_top\n",ru->idx);
ru->gNB_top(gNB_list[0],ru->proc.frame_rx,ru->proc.tti_rx,string,ru);
} else {
......@@ -1172,7 +1172,7 @@ int setup_RU_buffers(RU_t *ru) {
for (i=0; i<ru->nb_rx; i++) {
card = i/4;
ant = i%4;
printf("Mapping RU id %d, rx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
printf("Mapping RU id %u, rx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
free(ru->common.rxdata[i]);
ru->common.rxdata[i] = ru->openair0_cfg.rxbase[ru->rf_map.chain+ant];
printf("rxdata[%d] @ %p\n",i,ru->common.rxdata[i]);
......@@ -1186,7 +1186,7 @@ int setup_RU_buffers(RU_t *ru) {
for (i=0; i<ru->nb_tx; i++) {
card = i/4;
ant = i%4;
printf("Mapping RU id %d, tx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
printf("Mapping RU id %u, tx_ant %d, on card %d, chain %d\n",ru->idx,i,ru->rf_map.card+card, ru->rf_map.chain+ant);
free(ru->common.txdata[i]);
ru->common.txdata[i] = ru->openair0_cfg.txbase[ru->rf_map.chain+ant];
printf("txdata[%d] @ %p\n",i,ru->common.txdata[i]);
......@@ -1336,7 +1336,7 @@ static void *ru_thread_tx( void *param ) {
for (int j=0; j<gNB->num_RU; j++) {
if (ru == gNB->RU_list[j]) {
if ((gNB_proc->RU_mask_tx&(1<<j)) > 0)
LOG_E(PHY,"eNB %d frame %d, subframe %d : previous information from RU tx %d (num_RU %d,mask %x) has not been served yet!\n",
LOG_E(PHY,"gNB %d frame %d, subframe %d : previous information from RU tx %d (num_RU %d,mask %x) has not been served yet!\n",
gNB->Mod_id,gNB_proc->frame_rx,gNB_proc->slot_rx,ru->idx,gNB->num_RU,gNB_proc->RU_mask_tx);
gNB_proc->RU_mask_tx |= (1<<j);
......@@ -1386,7 +1386,7 @@ static void *ru_thread( void *param ) {
// set default return value
ru_thread_status = 0;
// set default return value
sprintf(threadname,"ru_thread %d",ru->idx);
sprintf(threadname,"ru_thread %u",ru->idx);
LOG_I(PHY,"Starting RU %d (%s,%s),\n",ru->idx,NB_functions[ru->function],NB_timing[ru->if_timing]);
......@@ -2009,7 +2009,7 @@ void set_function_spec_param(RU_t *ru) {
reset_meas(&ru->compression);
reset_meas(&ru->transport);
ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
printf("openair0_transport_init returns %d for ru_id %u\n", ret, ru->idx);
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
......@@ -2033,7 +2033,7 @@ void set_function_spec_param(RU_t *ru) {
reset_meas(&ru->compression);
reset_meas(&ru->transport);
ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
printf("openair0_transport_init returns %d for ru_id %u\n", ret, ru->idx);
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
......@@ -2056,7 +2056,7 @@ void set_function_spec_param(RU_t *ru) {
ru->fh_south_out = tx_rf; // local synchronous RF TX
ru->start_rf = start_rf; // need to start the local RF interface
ru->stop_rf = stop_rf;
printf("configuring ru_id %d (start_rf %p)\n", ru->idx, start_rf);
printf("configuring ru_id %u (start_rf %p)\n", ru->idx, start_rf);
/*
if (ru->function == gNodeB_3GPP) { // configure RF parameters only for 3GPP eNodeB, we need to get them from RAU otherwise
fill_rf_config(ru,rf_config_file);
......@@ -2086,7 +2086,7 @@ void set_function_spec_param(RU_t *ru) {
ru->ifdevice.eth_params = &ru->eth_params;
ru->ifdevice.configure_rru = configure_ru;
ret = openair0_transport_load(&ru->ifdevice,&ru->openair0_cfg,&ru->eth_params);
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
printf("openair0_transport_init returns %d for ru_id %u\n", ret, ru->idx);
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
......@@ -2112,7 +2112,7 @@ void set_function_spec_param(RU_t *ru) {
ru->ifdevice.eth_params = &ru->eth_params;
ru->ifdevice.configure_rru = configure_ru;
ret = openair0_transport_load(&ru->ifdevice, &ru->openair0_cfg, &ru->eth_params);
printf("openair0_transport_init returns %d for ru_id %d\n", ret, ru->idx);
printf("openair0_transport_init returns %d for ru_id %u\n", ret, ru->idx);
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
......
......@@ -116,7 +116,7 @@ static int8_t threequarter_fs=0;
uint32_t downlink_frequency[MAX_NUM_CCs][4];
int32_t uplink_frequency_offset[MAX_NUM_CCs][4];
//Temp fix for inexisting NR upper layer
//Temp fix for inexistent NR upper layer
unsigned char NB_gNB_INST = 1;
#if defined(ENABLE_ITTI)
......@@ -354,7 +354,7 @@ void *l2l1_task(void *arg) {
switch (ITTI_MSG_ID(message_p)) {
case INITIALIZE_MESSAGE:
/* Start eNB thread */
/* Start gNB thread */
LOG_D(EMU, "L2L1 TASK received %s\n", ITTI_MSG_NAME(message_p));
start_gNB = 1;
break;
......@@ -411,7 +411,7 @@ void *l2l1_task(void *arg) {
#endif
int create_gNB_tasks(uint32_t gnb_nb) {
LOG_D(GNB_APP, "%s(gnb_nb:%d\n", __FUNCTION__, gnb_nb);
LOG_D(GNB_APP, "%s(gnb_nb:%d)\n", __FUNCTION__, gnb_nb);
itti_wait_ready(1);
if (itti_create_task (TASK_L2L1, l2l1_task, NULL) < 0) {
......@@ -506,7 +506,7 @@ static void get_options(void) {
NRRCConfig();
NB_gNB_INST = RC.nb_nr_inst;
NB_RU = RC.nb_RU;
printf("Configuration: nb_rrc_inst %d, nb_nr_L1_inst %d, nb_ru %d\n",NB_gNB_INST,RC.nb_nr_L1_inst,NB_RU);
printf("Configuration: nb_rrc_inst %d, nb_nr_L1_inst %d, nb_ru %hhu\n",NB_gNB_INST,RC.nb_nr_L1_inst,NB_RU);
}
if(parallel_config != NULL) set_parallel_conf(parallel_config);
......@@ -707,7 +707,7 @@ void wait_gNBs(void) {
* helper function to terminate a certain ITTI task
*/
void terminate_task(task_id_t task_id, module_id_t mod_id) {
LOG_I(ENB_APP, "sending TERMINATE_MESSAGE to task %s (%d)\n", itti_get_task_name(task_id), task_id);
LOG_I(GNB_APP, "sending TERMINATE_MESSAGE to task %s (%d)\n", itti_get_task_name(task_id), task_id);
MessageDef *msg;
msg = itti_alloc_new_message (ENB_APP, TERMINATE_MESSAGE);
itti_send_msg_to_task (task_id, ENB_MODULE_ID_TO_INSTANCE(mod_id), msg);
......@@ -717,11 +717,11 @@ void terminate_task(task_id_t task_id, module_id_t mod_id) {
extern void nr_phy_free_RU(RU_t *);
int stop_L1L2(module_id_t gnb_id) {
LOG_W(ENB_APP, "stopping nr-softmodem\n");
LOG_W(GNB_APP, "stopping nr-softmodem\n");
oai_exit = 1;
if (!RC.ru) {
LOG_F(ENB_APP, "no RU configured\n");
LOG_F(GNB_APP, "no RU configured\n");
return -1;
}
......@@ -729,28 +729,28 @@ int stop_L1L2(module_id_t gnb_id) {
if (RC.ru[gnb_id]) {
if (RC.ru[gnb_id]->rfdevice.trx_stop_func) {
RC.ru[gnb_id]->rfdevice.trx_stop_func(&RC.ru[gnb_id]->rfdevice);
LOG_I(ENB_APP, "turned off RU rfdevice\n");
LOG_I(GNB_APP, "turned off RU rfdevice\n");
} else {
LOG_W(ENB_APP, "can not turn off rfdevice due to missing trx_stop_func callback, proceding anyway!\n");
LOG_W(GNB_APP, "can not turn off rfdevice due to missing trx_stop_func callback, proceeding anyway!\n");
}
if (RC.ru[gnb_id]->ifdevice.trx_stop_func) {
RC.ru[gnb_id]->ifdevice.trx_stop_func(&RC.ru[gnb_id]->ifdevice);
LOG_I(ENB_APP, "turned off RU ifdevice\n");
LOG_I(GNB_APP, "turned off RU ifdevice\n");
} else {
LOG_W(ENB_APP, "can not turn off ifdevice due to missing trx_stop_func callback, proceding anyway!\n");
LOG_W(GNB_APP, "can not turn off ifdevice due to missing trx_stop_func callback, proceeding anyway!\n");
}
} else {
LOG_W(ENB_APP, "no RU found for index %d\n", gnb_id);
LOG_W(GNB_APP, "no RU found for index %d\n", gnb_id);
return -1;
}
/* these tasks need to pick up new configuration */
terminate_task(TASK_RRC_ENB, gnb_id);
terminate_task(TASK_L2L1, gnb_id);
LOG_I(ENB_APP, "calling kill_gNB_proc() for instance %d\n", gnb_id);
LOG_I(GNB_APP, "calling kill_gNB_proc() for instance %d\n", gnb_id);
kill_gNB_proc(gnb_id);
LOG_I(ENB_APP, "calling kill_NR_RU_proc() for instance %d\n", gnb_id);
LOG_I(GNB_APP, "calling kill_NR_RU_proc() for instance %d\n", gnb_id);
kill_NR_RU_proc(gnb_id);
oai_exit = 0;
......@@ -771,7 +771,7 @@ int restart_L1L2(module_id_t gnb_id) {
RU_t *ru = RC.ru[gnb_id];
int cc_id;
MessageDef *msg_p = NULL;
LOG_W(ENB_APP, "restarting nr-softmodem\n");
LOG_W(GNB_APP, "restarting nr-softmodem\n");
/* block threads */
sync_var = -1;
......@@ -784,7 +784,7 @@ int restart_L1L2(module_id_t gnb_id) {
/* TODO this should be done for all RUs associated to this gNB */
memcpy(&ru->nr_frame_parms, &RC.gNB[gnb_id][0]->frame_parms, sizeof(NR_DL_FRAME_PARMS));
set_function_spec_param(RC.ru[gnb_id]);
LOG_I(ENB_APP, "attempting to create ITTI tasks\n");
LOG_I(GNB_APP, "attempting to create ITTI tasks\n");
if (itti_create_task (TASK_RRC_ENB, rrc_enb_task, NULL) < 0) {
LOG_E(RRC, "Create task for RRC eNB failed\n");
......
......@@ -539,7 +539,7 @@ void trashFrame(PHY_VARS_NR_UE *UE, openair0_timestamp *timestamp) {
UE->frame_parms.samples_per_subframe,
UE->frame_parms.nb_antennas_rx);
if (IS_SOFTMODEM_RFSIM ) {
usleep(1000); // slow down, as would do actuall rf to let cpu for the synchro thread
usleep(1000); // slow down, as would do actual rf to let cpu for the synchro thread
}
}
......@@ -639,7 +639,7 @@ void *UE_thread(void *arg) {
}
}
AssertFatal( !syncRunning, "At this point synchronisation can't be running\n");
AssertFatal( !syncRunning, "At this point synchronization can't be running\n");
if (!UE->is_synchronized) {
readFrame(UE, &timestamp);
......@@ -668,7 +668,7 @@ void *UE_thread(void *arg) {
// we have the decoded frame index in the return of the synch process
// and we shifted above to the first slot of next frame
decoded_frame_rx++;
// we do ++ first in the regular processing, so it will be beging of frame;
// we do ++ first in the regular processing, so it will be begin of frame;
absolute_slot=decoded_frame_rx*nb_slot_frame + nb_slot_frame -1;
continue;
}
......@@ -832,7 +832,7 @@ void init_NR_UE(int nb_inst) {
mac_inst->initial_bwp_ul.scs = UE->frame_parms.subcarrier_spacing;
mac_inst->initial_bwp_ul.N_RB = UE->frame_parms.N_RB_UL;
mac_inst->initial_bwp_ul.cyclic_prefix = UE->frame_parms.Ncp;
LOG_I(PHY,"Intializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
LOG_I(PHY,"Initializing UE Threads for instance %d (%p,%p)...\n",inst,PHY_vars_UE_g[inst],PHY_vars_UE_g[inst][0]);
threadCreate(&threads[inst], UE_thread, (void *)UE, "UEthread", -1, OAI_PRIORITY_RT_MAX);
#ifdef UE_DLSCH_PARALLELISATION
......
......@@ -82,7 +82,7 @@ unsigned short config_frames[4] = {2,9,11,13};
/* Callbacks, globals and object handlers */
extern void reset_stats( FL_OBJECT *, long );
//extern void initTpool(char *params,tpool_t *pool, bool performanceMeas);
//extern void initTpool(char *params, tpool_t *pool, bool performanceMeas);
/* Forms and Objects */
......@@ -433,19 +433,19 @@ static void get_options(void) {
/*if (frame_parms[0]->N_RB_DL !=0) {
if ( frame_parms[0]->N_RB_DL < 6 ) {
frame_parms[0]->N_RB_DL = 6;
printf ( "%i: Invalid number of ressource blocks, adjusted to 6\n",frame_parms[0]->N_RB_DL);
printf ( "%i: Invalid number of resource blocks, adjusted to 6\n",frame_parms[0]->N_RB_DL);
}
if ( frame_parms[0]->N_RB_DL > 100 ) {
frame_parms[0]->N_RB_DL = 100;
printf ( "%i: Invalid number of ressource blocks, adjusted to 100\n",frame_parms[0]->N_RB_DL);
printf ( "%i: Invalid number of resource blocks, adjusted to 100\n",frame_parms[0]->N_RB_DL);
}
if ( frame_parms[0]->N_RB_DL > 50 && frame_parms[0]->N_RB_DL < 100 ) {
frame_parms[0]->N_RB_DL = 50;
printf ( "%i: Invalid number of ressource blocks, adjusted to 50\n",frame_parms[0]->N_RB_DL);
printf ( "%i: Invalid number of resource blocks, adjusted to 50\n",frame_parms[0]->N_RB_DL);
}
if ( frame_parms[0]->N_RB_DL > 25 && frame_parms[0]->N_RB_DL < 50 ) {
frame_parms[0]->N_RB_DL = 25;
printf ( "%i: Invalid number of ressource blocks, adjusted to 25\n",frame_parms[0]->N_RB_DL);
printf ( "%i: Invalid number of resource blocks, adjusted to 25\n",frame_parms[0]->N_RB_DL);
}
UE_scan = 0;
frame_parms[0]->N_RB_UL=frame_parms[0]->N_RB_DL;
......@@ -588,7 +588,7 @@ void init_openair0(void) {
else //FDD
openair0_cfg[card].duplex_mode = duplex_mode_FDD;
printf("HW: Configuring card %d, nb_antennas_tx/rx %d/%d\n",card,
printf("HW: Configuring card %d, nb_antennas_tx/rx %hhu/%hhu\n",card,
PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx,
PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx);
openair0_cfg[card].Mod_id = 0;
......@@ -714,7 +714,7 @@ int main( int argc, char **argv ) {
PHY_vars_UE_g[0] = malloc(sizeof(PHY_VARS_NR_UE *)*MAX_NUM_CCs);
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
printf("frame_parms %d\n",frame_parms[CC_id]->ofdm_symbol_size);
printf("frame_parms %hu\n",frame_parms[CC_id]->ofdm_symbol_size);
nr_init_frame_parms_ue(frame_parms[CC_id],numerology,NORMAL,frame_parms[CC_id]->N_RB_DL,(frame_parms[CC_id]->N_RB_DL-20)>>1,0);
PHY_vars_UE_g[0][CC_id] = init_nr_ue_vars(frame_parms[CC_id], 0,abstraction_flag);
UE[CC_id] = PHY_vars_UE_g[0][CC_id];
......
......@@ -19,7 +19,7 @@
contact@openairinterface.org
*/
/*!\brief Initilization and reconfiguration routines for LTE PHY */
/*!\brief Initialization and reconfiguration routines for LTE PHY */
#include "phy_init.h"
#include "PHY/phy_extern.h"
#include "PHY/CODING/coding_extern.h"
......
......@@ -166,7 +166,7 @@ NR_gNB_ULSCH_t *new_gNB_ulsch(uint8_t max_ldpc_iterations,uint8_t N_RB_UL, uint8
return(ulsch);
}
printf("new_gNB_ulsch with size %zu: exit_flag = %u\n",sizeof(NR_UL_gNB_HARQ_t), exit_flag);
printf("new_gNB_ulsch with size %zu: exit_flag = %hhu\n",sizeof(NR_UL_gNB_HARQ_t), exit_flag);
free_gNB_ulsch(&ulsch);
return(NULL);
}
......
......@@ -412,7 +412,7 @@ typedef enum {
} rru_state_t;
/// Some commamds to RRU. Not sure we should do it like this !
/// Some commands to RRU. Not sure we should do it like this !
typedef enum {
EMPTY = 0,
STOP_RU = 1,
......@@ -434,7 +434,7 @@ typedef struct RU_t_s {
node_function_t function;
/// Ethernet parameters for fronthaul interface
eth_params_t eth_params;
/// flag to indicate the RU is in synch with a master reference
/// flag to indicate the RU is in sync with a master reference
int in_synch;
/// timing offset
int rx_offset;
......@@ -565,7 +565,7 @@ typedef struct RU_t_s {
time_stats_t rx_fhaul;
/// Timing statistics (TX Fronthaul + Compression)
time_stats_t tx_fhaul;
/// Timong statistics (Compression)
/// Timing statistics (Compression)
time_stats_t compression;
/// Timing statistics (Fronthaul transport)
time_stats_t transport;
......@@ -676,7 +676,7 @@ typedef struct RRU_config_s {
uint32_t tx_freq[MAX_BANDS_PER_RRU];
/// RX frequency
uint32_t rx_freq[MAX_BANDS_PER_RRU];
/// TX attenation w.r.t. max
/// TX attenuation w.r.t. max
uint8_t att_tx[MAX_BANDS_PER_RRU];
/// RX attenuation w.r.t. max
uint8_t att_rx[MAX_BANDS_PER_RRU];
......@@ -695,7 +695,7 @@ typedef struct RRU_config_s {
int emtc_prach_FreqOffset[MAX_BANDS_PER_RRU][4];
/// emtc_prach_ConfigIndex for IF4p5 per CE Level
int emtc_prach_ConfigIndex[MAX_BANDS_PER_RRU][4];
/// mutex for asynch RX/TX thread
/// mutex for async RX/TX thread
pthread_mutex_t mutex_asynch_rxtx;
/// mutex for RU access to eNB processing (PDSCH/PUSCH)
pthread_mutex_t mutex_RU;
......
......@@ -163,7 +163,7 @@ int netlink_init(void) {
}
}
printf("[NETLINK]Opened socket with fd %d\n",nas_sock_fd[0]);
printf("[NETLINK] Opened socket with fd %d\n",nas_sock_fd[0]);
ret = fcntl(nas_sock_fd[0],F_SETFL,O_NONBLOCK);
if (ret == -1) {
......
......@@ -41,7 +41,7 @@ enum sctp_state_e {
};
typedef struct sctp_new_association_req_s {
/* Upper layer connexion identifier */
/* Upper layer connection identifier */
uint16_t ulp_cnx_id;
/* The port to connect to */
......@@ -60,7 +60,7 @@ typedef struct sctp_new_association_req_s {
} sctp_new_association_req_t;
typedef struct sctp_new_association_req_multi_s {
/* Upper layer connexion identifier */
/* Upper layer connection identifier */
uint16_t ulp_cnx_id;
/* The port to connect to */
......@@ -98,7 +98,7 @@ typedef struct sctp_new_association_ind_s {
} sctp_new_association_ind_t;
typedef struct sctp_new_association_resp_s {
/* Upper layer connexion identifier */
/* Upper layer connection identifier */
uint16_t ulp_cnx_id;
/* SCTP Association ID */
......@@ -149,7 +149,7 @@ typedef struct sctp_listener_register_upper_layer_s {
/* Port to listen to */
uint16_t port;
/* Payload protocol identifier
* Any data receveid on PPID != will be discarded
* Any data received on PPID != will be discarded
*/
uint32_t ppid;
} sctp_listener_register_upper_layer_t;
......
......@@ -117,7 +117,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
/* mandatory */
/* c2. GNB_DU_ID (integrer value) */
/* c2. GNB_DU_ID (integer value) */
ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_ID;
ie->criticality = F1AP_Criticality_reject;
......@@ -138,7 +138,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
}
/* mandatory */
/* c4. serverd cells list */
/* c4. served cells list */
ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t));
ie->id = F1AP_ProtocolIE_ID_id_gNB_DU_Served_Cells_List;
ie->criticality = F1AP_Criticality_reject;
......@@ -150,7 +150,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
i<num_cells_available;
i++) {
/* mandatory */
/* 4.1 serverd cells item */
/* 4.1 served cells item */
F1AP_GNB_DU_Served_Cells_ItemIEs_t *gnb_du_served_cell_list_item_ies;
gnb_du_served_cell_list_item_ies = (F1AP_GNB_DU_Served_Cells_ItemIEs_t *)calloc(1, sizeof(F1AP_GNB_DU_Served_Cells_ItemIEs_t));
......@@ -162,7 +162,7 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) {
F1AP_GNB_DU_Served_Cells_Item_t gnb_du_served_cells_item;
memset((void *)&gnb_du_served_cells_item, 0, sizeof(F1AP_GNB_DU_Served_Cells_Item_t));
/* 4.1.1 serverd cell Information */
/* 4.1.1 served cell Information */
F1AP_Served_Cell_Information_t served_cell_information;
memset((void *)&served_cell_information, 0, sizeof(F1AP_Served_Cell_Information_t));
......
......@@ -140,7 +140,7 @@ void *gNB_app_task(void *args_p)
itti_mark_task_ready (TASK_GNB_APP);
LOG_I(PHY, "%s() Task ready initialise structures\n", __FUNCTION__);
LOG_I(PHY, "%s() Task ready initialize structures\n", __FUNCTION__);
RCconfig_NR_L1();
......
......@@ -410,7 +410,7 @@ void RCconfig_nr_macrlc() {
RC.nrmac[j]->eth_params_s.remote_portd = *(MacRLC_ParamList.paramarray[j][MACRLC_REMOTE_S_PORTD_IDX].iptr);
RC.nrmac[j]->eth_params_s.transp_preference = ETH_UDP_MODE;
//sf_ahead = 2; // Cannot cope with 4 subframes betweem RX and TX - set it to 2
//sf_ahead = 2; // Cannot cope with 4 subframes between RX and TX - set it to 2
printf("**************** vnf_port:%d\n", RC.mac[j]->eth_params_s.my_portc);
configure_nfapi_vnf(RC.nrmac[j]->eth_params_s.my_addr, RC.nrmac[j]->eth_params_s.my_portc);
......@@ -682,7 +682,7 @@ void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc) {
gnb_id = *(GNBParamList.paramarray[i][GNB_GNB_ID_IDX].uptr);
}
printf("NRRRC %d: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr));
printf("NRRRC %u: Southbound Transport %s\n",i,*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr));
if (strcmp(*(GNBParamList.paramarray[i][GNB_TRANSPORT_S_PREFERENCE_IDX].strptr), "local_mac") == 0) {
......@@ -2976,7 +2976,7 @@ void NRRCConfig(void) {
/* get global parameters, defined outside any section in the config file */
printf("Getting GNBSParams\n");
LOG_I(GNB_APP, "Getting GNBSParams\n");
config_get( GNBSParams,sizeof(GNBSParams)/sizeof(paramdef_t),NULL);
RC.nb_nr_inst = GNBSParams[GNB_ACTIVE_GNBS_IDX].numelt;
......
......@@ -257,7 +257,7 @@ int nas_config(int interface_id, int thirdOctet, int fourthOctet, char *ifname)
returnValue=bringInterfaceUp(interfaceName, 1);
if(!returnValue)
LOG_I(OIP,"Interface %s successfuly configured, ip address %s, mask %s broadcast address %s\n",
LOG_I(OIP,"Interface %s successfully configured, ip address %s, mask %s broadcast address %s\n",
interfaceName, ipAddress, netMask, broadcastAddress);
else
LOG_E(OIP,"Interface %s couldn't be configured (ip address %s, mask %s broadcast address %s)\n",
......
......@@ -125,7 +125,7 @@ typedef struct xer_sprint_string_s {
size_t string_index;
} xer_sprint_string_t;
//repplace LTE
//replace LTE
//extern unsigned char NB_eNB_INST;
extern unsigned char NB_gNB_INST;
extern uint8_t usim_test;
......
......@@ -32,9 +32,10 @@
#include "defs.h"
#include "rrc_proto.h"
#include "common/utils/LOG/log.h"
int nr_l3_init_ue(void){
//LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
LOG_I(RRC, "[MAIN] NR UE MAC initialization...\n");
openair_rrc_top_init_ue_nr();
......
......@@ -400,14 +400,14 @@ int8_t nr_rrc_ue_decode_NR_DL_DCCH_Message(
case NR_DL_DCCH_MessageType__c1_PR_spare2:
case NR_DL_DCCH_MessageType__c1_PR_spare1:
default:
// not support or unuse
// not supported or unused
break;
}
break;
case NR_DL_DCCH_MessageType_PR_NOTHING:
case NR_DL_DCCH_MessageType_PR_messageClassExtension:
default:
// not support or unuse
// not supported or unused
break;
}
......
......@@ -49,7 +49,7 @@ typedef struct Geo {
int node_type;
int Neighbors; // number of neighboring nodes (distance between the node and its neighbors < 100)
int Neighbor[NUMBER_OF_UE_MAX]; // array of its neighbors
//relavent to UE only
//relevant to UE only
unsigned short state;
unsigned short rnti;
unsigned int connected_eNB;
......
......@@ -193,8 +193,7 @@ int main(int argc, const char *argv[])
** Description: Manages the connection endpoint use to communicate with **
** the user application layer **
** **
** Inputs: fd: The descriptor of the user connection end- **
** point **
** Inputs: fd: The descriptor of the user connection end-point **
** Others: None **
** **
** Outputs: Return: None **
......@@ -232,8 +231,7 @@ static void *_nas_user_mngr(void *args)
** Description: Manages the connection endpoint use to communicate with **
** the network sublayer **
** **
** Inputs: fd: The descriptor of the network connection **
** endpoint **
** Inputs: fd: The descriptor of the network connection endpoint **
** Others: None **
** **
** Outputs: Return: None **
......
......@@ -173,7 +173,7 @@ int nas_network_process_data(nas_user_t *user, int msg_id, const void *data)
}
case AS_NAS_RELEASE_IND:
/* Received NAS signalling connection releaase indication */
/* Received NAS signalling connection release indication */
rc = nas_proc_release_ind(user, msg->msg.nas_release_ind.cause);
break;
......
......@@ -54,7 +54,7 @@ Description NAS command line parser
* Identifiers of the NAS command line options
*/
enum {
NAS_PARSER_UE_ID, /* User Equipement Identifier */
NAS_PARSER_UE_ID, /* User Equipment Identifier */
NAS_PARSER_TRACE_LEVEL, /* Logging trace level */
NAS_PARSER_USER_HOST, /* User app layer's hostname */
NAS_PARSER_NETWORK_HOST, /* Network layer's hostname */
......@@ -121,8 +121,7 @@ static int atohex(const char *a_char);
** Name: nas_parser_print_usage() **
** **
** Description: Displays the command line options used to run the NAS **
** process and the firmware version defined at compilation **
** time **
** process and the firmware version defined at compilation time **
** **
** Inputs: version: Firmware version **
** Others: None **
......
......@@ -41,7 +41,7 @@
#include "sctp_common.h"
/* Pre-bind socket options configuration.
* See http://linux.die.net/man/7/sctp for more informations on these options.
* See http://linux.die.net/man/7/sctp for more information on these options.
*/
int sctp_set_init_opt(int sd, uint16_t instreams, uint16_t outstreams,
uint16_t max_attempts, uint16_t init_timeout)
......
......@@ -56,7 +56,7 @@ typedef int64_t openair0_timestamp;
typedef volatile int64_t openair0_vtimestamp;
/*!\brief structrue holds the parameters to configure USRP devices*/
/*!\brief structure holds the parameters to configure USRP devices*/
typedef struct openair0_device_t openair0_device;
//#define USRP_GAIN_OFFSET (56.0) // 86 calibrated for USRP B210 @ 2.6 GHz to get equivalent RS EPRE in OAI to SMBV100 output
......@@ -287,7 +287,7 @@ struct openair0_device_t {
/*!brief Type of this device */
dev_type_t type;
/*!brief Transport protocol type that the device suppports (in case I/Q samples need to be transported) */
/*!brief Transport protocol type that the device supports (in case I/Q samples need to be transported) */
transport_type_t transp_type;
/*!brief Type of the device's host (RAU/RRU) */
......
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