diff --git a/openair1/PHY/LTE_ESTIMATION/defs.h b/openair1/PHY/LTE_ESTIMATION/defs.h index bba8c614f275cfa4606d03473e69974f1f522ace..40267672fe5309f326db138657b6e96adac4608f 100644 --- a/openair1/PHY/LTE_ESTIMATION/defs.h +++ b/openair1/PHY/LTE_ESTIMATION/defs.h @@ -86,6 +86,11 @@ int lte_dl_msbfn_channel_estimation(PHY_VARS_UE *phy_vars_ue, unsigned char l, unsigned char symbol); +int lte_dl_mbsfn_channel_estimation(PHY_VARS_UE *phy_vars_ue, + u8 eNB_id, + u8 eNB_offset, + int subframe, + unsigned char l); /* #ifdef EMOS diff --git a/openair1/PHY/LTE_TRANSPORT/pbch.c b/openair1/PHY/LTE_TRANSPORT/pbch.c index 6932ee45b4a41577aadbfd110b5e3b6c1d0a8469..182b40761bebb42864553f2f70ae36be8c4712a5 100755 --- a/openair1/PHY/LTE_TRANSPORT/pbch.c +++ b/openair1/PHY/LTE_TRANSPORT/pbch.c @@ -81,7 +81,10 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, u8 RCC; u32 nsymb = (frame_parms->Ncp==NORMAL) ? 14:12; - u32 pilots,pilots_2; + u32 pilots; +#ifdef INTERFERENCE_MITIGATION + u32 pilots_2; +#endif u32 second_pilot = (frame_parms->Ncp==NORMAL) ? 4 : 3; u32 jj=0; u32 re_allocated=0; @@ -230,10 +233,14 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, for (l=(nsymb>>1);l<(nsymb>>1)+4;l++) { pilots=0; +#ifdef INTERFERENCE_MITIGATION pilots_2 = 0; +#endif if ((l==0) || (l==(nsymb>>1))){ pilots=1; +#ifdef INTERFERENCE_MITIGATION pilots_2=1; +#endif } if ((l==1) || (l==(nsymb>>1)+1)){ diff --git a/openair1/PHY/LTE_TRANSPORT/pmch.c b/openair1/PHY/LTE_TRANSPORT/pmch.c index 97f276256a7a3db27dddddc0e1beeae9fa20adc4..428d2565087da92ac3597ce8a0b67ec651c3030f 100644 --- a/openair1/PHY/LTE_TRANSPORT/pmch.c +++ b/openair1/PHY/LTE_TRANSPORT/pmch.c @@ -625,7 +625,8 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, __m128i xmm1,xmm2,*ch_mag,*ch_magb; __m128i *rxF = (__m128i*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)]; - int j=0,i,len,len2; + int i,len,len2; +// int j=0; unsigned char len_mod4; short *llr; s16 *llr2; diff --git a/openair1/PHY/MODULATION/slot_fep_mbsfn.c b/openair1/PHY/MODULATION/slot_fep_mbsfn.c index 87357a31e2503a4421a0dc9f1bfa030c3906b39b..83dcdef3b2dbcdb7a2963c78d6924ad63e4f092c 100644 --- a/openair1/PHY/MODULATION/slot_fep_mbsfn.c +++ b/openair1/PHY/MODULATION/slot_fep_mbsfn.c @@ -21,7 +21,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, unsigned int nb_prefix_samples0 = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples0); unsigned int subframe_offset; - int i; +// int i; unsigned int frame_length_samples = frame_parms->samples_per_tti * 10; void (*dft)(int16_t *,int16_t *, int); @@ -161,7 +161,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, i+1, subframe, l); - /* lte_dl_channel_estimation(phy_vars_ue,eNB_id,0, + lte_dl_channel_estimation(phy_vars_ue,eNB_id,0, Ns, aa, l, diff --git a/openair2/LAYER2/MAC/ra_procedures.c b/openair2/LAYER2/MAC/ra_procedures.c index 433664a66037ff38005a3171b412335c1f1c8f01..369ac7246d61fa7d91067cb393d07343eab323b5 100644 --- a/openair2/LAYER2/MAC/ra_procedures.c +++ b/openair2/LAYER2/MAC/ra_procedures.c @@ -230,7 +230,6 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ mac_rlc_status_resp_t rlc_status; u8 dcch_header_len=0; u16 sdu_lengths[8]; - u8 sdu_lcids[8]; u8 ulsch_buff[MAX_ULSCH_PAYLOAD_BYTES]; if (UE_mode == PRACH) { @@ -310,8 +309,6 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ sdu_lengths[0] = mac_rlc_data_req(Mod_id+NB_eNB_INST,frame,RLC_MBMS_NO, DCCH, (char *)&ulsch_buff[0]); - - sdu_lcids[0] = DCCH; LOG_D(MAC,"[UE %d] TX Got %d bytes for DCCH\n",Mod_id,sdu_lengths[0]); update_bsr(Mod_id, frame, DCCH,UE_mac_inst[Mod_id].scheduling_info.LCGID[DCCH]); diff --git a/openair2/LAYER2/MAC/rar_tools.c b/openair2/LAYER2/MAC/rar_tools.c index 31ef337e90588f4ad6e1ff495da1f5d5496a8b74..0682fc40771736b0e92ced8acc4a97faad2a751e 100644 --- a/openair2/LAYER2/MAC/rar_tools.c +++ b/openair2/LAYER2/MAC/rar_tools.c @@ -43,6 +43,9 @@ #include "UTIL/LOG/log.h" #include "OCG.h" #include "OCG_extern.h" +#if defined(USER_MODE) && defined(OAI_EMU) +# include "UTIL/OPT/opt.h" +#endif #define DEBUG_RAR diff --git a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c index a7c36709d6ed51214f03ebc29a0ae7db6aa29245..6c5f01b5cd5522a8d7baafbcb1678a75368efea1 100755 --- a/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c +++ b/openair2/LAYER2/PDCP_v10.1.0/pdcp_fifo.c @@ -101,9 +101,12 @@ int pdcp_fifo_flush_sdus (u32_t frame,u8 eNB_flag) int bytes_wrote = 0; int pdcp_nb_sdu_sent = 0; u8 cont = 1; - int ret; int mcs_inst; +#if defined(NAS_NETLINK) && defined(LINUX) + int ret = 0; +#endif + while (sdu && cont) { #if defined(OAI_EMU) @@ -701,6 +704,8 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index u8 pdcp_mode, is_ue=0; Packet_otg_elt * otg_pkt_info; + src_id = eNB_index; + // we need to add conditions to avoid transmitting data when the UE is not RRC connected. #if defined(USER_MODE) && defined(OAI_EMU) if (oai_emulation.info.otg_enabled ==1 ){ @@ -744,7 +749,6 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index #else if ((otg_enabled==1) && (eNB_flag == 1)) { // generate DL traffic unsigned int ctime=0; - src_id = eNB_index; ctime = frame * 100; /*if ((mac_get_rrc_status(eNB_index, eNB_flag, 0 ) > 2) && diff --git a/openair2/LAYER2/openair2_proc.c b/openair2/LAYER2/openair2_proc.c index 6aeeef602bd2c9ca6a4545d6f914299daa0b7177..5551cca555be7f49fa96523471c96699bc03ede2 100644 --- a/openair2/LAYER2/openair2_proc.c +++ b/openair2/LAYER2/openair2_proc.c @@ -68,7 +68,7 @@ static mapping rrc_status_names[] = { int dump_eNB_l2_stats(char *buffer, int length){ - u8 eNB_id,UE_id,lcid,i,j,number_of_cards; + u8 eNB_id,UE_id,number_of_cards; int len= length; #ifdef EXMIMO diff --git a/openair2/UTIL/LOG/log.c b/openair2/UTIL/LOG/log.c index c8486ac9a04b98f9210a05bbdb72312dad0e005a..838338be1b6541d6f6c0746102425e590e01a14b 100755 --- a/openair2/UTIL/LOG/log.c +++ b/openair2/UTIL/LOG/log.c @@ -356,8 +356,8 @@ void logRecord(const char *file, const char *func, int line, int comp, va_end(args); //2 first parameters must be passed as 'const' to the thread function - log_params.file = file; - log_params.func = func; + log_params.file = strdup(file); + log_params.func = strdup(func); log_params.line = line; log_params.comp = comp; log_params.level = level; diff --git a/openair2/UTIL/OMG/id_manager.c b/openair2/UTIL/OMG/id_manager.c index 575cd3d460b9717f71a87305480a00a5cb240b3c..74d44184450d3e83b5d1dbc7595b963204ccb83f 100644 --- a/openair2/UTIL/OMG/id_manager.c +++ b/openair2/UTIL/OMG/id_manager.c @@ -179,11 +179,11 @@ int get_oai_entry(char *sumo_id, Map_list Map_Vector) { Map_list remove_oai_entry(char *sumo_id, Map_list Map_Vector) { Map_list tmp = Map_Vector; - Map_list entry; +// Map_list entry; //printf("removing entry %s \n",sumo_id); if (strcmp(tmp->map->sumo_id, sumo_id) == 0) { //printf("1: found it %s \n",tmp->map->sumo_id); - int id = tmp->map->oai_id; +// int id = tmp->map->oai_id; // free(tmp); if(tmp->next == NULL) return NULL; @@ -202,8 +202,8 @@ Map_list remove_oai_entry(char *sumo_id, Map_list Map_Vector) { while (tmp->next != NULL){ if (strcmp(tmp->next->map->sumo_id, sumo_id) == 0) { //printf("2: found it %s \n",tmp->next->map->sumo_id); - int id = tmp->next->map->oai_id; - entry = tmp->next; // save the entry to remove +// int id = tmp->next->map->oai_id; +// entry = tmp->next; // save the entry to remove tmp->next = tmp->next->next; // jump over the entry to be removed // free(entry); // freeing the entry //if(strcmp(tmp->next->map->sumo_id, "0") == 0) diff --git a/openair2/UTIL/OMG/socket_traci_OMG.c b/openair2/UTIL/OMG/socket_traci_OMG.c index 61b631bbc4562fb2dc0b9639b7366a4b59ef56b2..b94d5fd757d91a1d2d7c34bfdb3586e3f87c88c7 100644 --- a/openair2/UTIL/OMG/socket_traci_OMG.c +++ b/openair2/UTIL/OMG/socket_traci_OMG.c @@ -148,7 +148,7 @@ storage * receiveExact(){ tracker = writePacket(bufLength, 4); // store pointer to free the space later - storage *freeTracker = tracker; +// storage *freeTracker = tracker; int s= readInt(); int NN = s - 4; printf("debug \n"); diff --git a/openair2/UTIL/OMG/sumo.c b/openair2/UTIL/OMG/sumo.c index 3f6c988fd7bcaecf55847344c6a45ca4b933955f..91e9c5bdfcac790163acbc5669c2fde8a2341b7d 100644 --- a/openair2/UTIL/OMG/sumo.c +++ b/openair2/UTIL/OMG/sumo.c @@ -78,7 +78,7 @@ sprintf(sumo_line, "%s -c %s ",omg_param_list.sumo_command, omg_param_list.sumo_ arrived = NULL; // switch on error to return to OAI - int error = handshake(omg_param_list.sumo_host,omg_param_list.sumo_port); + handshake(omg_param_list.sumo_host,omg_param_list.sumo_port); init(omg_param_list.sumo_end - omg_param_list.sumo_start); diff --git a/openair2/UTIL/OMG/trace.c b/openair2/UTIL/OMG/trace.c index 6f5b63fa9d620d314f198d353ef36b8c44a10371..fe9a8732740908637405263fbfb8c7d8be17f87a 100644 --- a/openair2/UTIL/OMG/trace.c +++ b/openair2/UTIL/OMG/trace.c @@ -50,7 +50,6 @@ extern hash_table_t* table; int start_trace_generator(omg_global_param omg_param_list) { - NodePtr node = NULL; // MobilityPtr mobility = NULL; //read the mobility file here @@ -85,7 +84,7 @@ int deploy_nodes() { NodePtr node = NULL; - int count = 0; +// int count = 0; node_info * head_node = head_node_info; while (head_node!=NULL){ @@ -235,7 +234,7 @@ Pair move_trace_node(NodePtr node, double cur_time) { return keep_awake_trace_node(node,cur_time,9999,1); } else{ // location discription available - Job_list tmp1 = Job_Vector; +// Job_list tmp1 = Job_Vector; LOG_D(OMG, "Location fetch : (%.2f, %.2f)\n", next_loc->x, next_loc->y); double X_next; diff --git a/openair2/UTIL/OPT/opt.h b/openair2/UTIL/OPT/opt.h index db5c25148858ad10cf4ebe83e3de5b3a99e295bc..ba762274ef11ea854e4e5b9baa3524c39dfcb6ef 100644 --- a/openair2/UTIL/OPT/opt.h +++ b/openair2/UTIL/OPT/opt.h @@ -56,7 +56,7 @@ This header file must be included */ #ifndef project_include #define project_include #include "UTIL/LOG/log_if.h" -#include "UTIL/LOG/log_extern.h" +// #include "UTIL/LOG/log_extern.h" #include "PHY/defs.h" #include "PHY/extern.h" #include "PHY/impl_defs_lte.h" diff --git a/openair2/UTIL/OTG/otg_form.c b/openair2/UTIL/OTG/otg_form.c index d41d06bd1210e31f558efd0239b6c7f3072ea1f3..52e40028353ed65e8f4e83a20d71acde0d99f53b 100644 --- a/openair2/UTIL/OTG/otg_form.c +++ b/openair2/UTIL/OTG/otg_form.c @@ -1,7 +1,7 @@ #include "otg_form.h" #include "otg_vars.h" - +#include "otg_kpi.h" extern unsigned char NB_eNB_INST; extern unsigned char NB_UE_INST; @@ -150,7 +150,7 @@ if (otg_forms_info->idx_ul[src][dst]==MAX_SAMPLES-1){ - nb_loss_pkts(); + otg_kpi_nb_loss_pkts(); sprintf(loss_rate, "%s%d","NB Loss pkts UL=", otg_info->total_loss_ul); fl_set_object_label(form_ul->loss_ratio, loss_rate); sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime); @@ -170,7 +170,7 @@ if (otg_forms_info->idx_ul[src][dst]==MAX_SAMPLES-1){ fl_set_xyplot_key(form_ul->throughput, 0, curve_label); fl_set_xyplot_key_position(form_ul->throughput, x_key_position,y_key_position , FL_ALIGN_BOTTOM_LEFT); - nb_loss_pkts(); + otg_kpi_nb_loss_pkts(); sprintf(loss_rate, "%s%d","NB Loss pkts UL=",otg_info->total_loss_ul); fl_set_object_label(form_ul->loss_ratio, loss_rate); sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime); @@ -245,7 +245,7 @@ if (otg_forms_info->idx_dl[src][dst]==MAX_SAMPLES-1){ sprintf(curve_label, "%d%s%d", src,"-->", dst); fl_set_xyplot_key(form_dl->throughput, 0, curve_label); fl_set_xyplot_key_position(form_dl->throughput, x_key_position,y_key_position, FL_ALIGN_BOTTOM_LEFT); - nb_loss_pkts(); + otg_kpi_nb_loss_pkts(); sprintf(loss_rate, "%s%d","NB Loss pkts DL=",otg_info->total_loss_dl); fl_set_object_label(form_dl->loss_ratio, loss_rate); @@ -265,7 +265,7 @@ if (otg_forms_info->idx_dl[src][dst]==MAX_SAMPLES-1){ fl_set_xyplot_key(form_dl->throughput, 0, curve_label); fl_set_xyplot_key_position(form_dl->throughput,x_key_position,y_key_position, FL_ALIGN_BOTTOM_LEFT); - nb_loss_pkts(); + otg_kpi_nb_loss_pkts(); sprintf(loss_rate, "%s%d","NB Loss pkts DL=",otg_info->total_loss_dl); fl_set_object_label(form_dl->loss_ratio, loss_rate); sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime); diff --git a/openair2/UTIL/OTG/otg_kpi.c b/openair2/UTIL/OTG/otg_kpi.c index bdf391cb039584033ce208f66eb692bb9b4aeb4c..a144b1ffa8349ae190144901290d346bb46f4ee5 100644 --- a/openair2/UTIL/OTG/otg_kpi.c +++ b/openair2/UTIL/OTG/otg_kpi.c @@ -122,7 +122,7 @@ void rx_loss_rate_bytes(int src, int dst, int application){ } -void nb_loss_pkts(){ +void otg_kpi_nb_loss_pkts(void){ unsigned int i,j,k; otg_info->total_loss_dl=0; diff --git a/openair2/UTIL/OTG/otg_kpi.h b/openair2/UTIL/OTG/otg_kpi.h index 15de3bac82b4dc4c7a7142be53e0b9316e234f40..d3eada46be0885128912f918c0c0418b60627baa 100644 --- a/openair2/UTIL/OTG/otg_kpi.h +++ b/openair2/UTIL/OTG/otg_kpi.h @@ -105,6 +105,6 @@ void add_log_metric(int src, int dst, int ctime, double metric, unsigned int lab void add_log_label(unsigned int label, unsigned int * start_log_metric); -void nb_loss_pkts(); +void otg_kpi_nb_loss_pkts(void); #endif