Commit 356785af authored by Cedric Roux's avatar Cedric Roux

- Fixed some more compiler warnings

pre-ci tests passed

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4401 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 64c5020b
...@@ -86,6 +86,11 @@ int lte_dl_msbfn_channel_estimation(PHY_VARS_UE *phy_vars_ue, ...@@ -86,6 +86,11 @@ int lte_dl_msbfn_channel_estimation(PHY_VARS_UE *phy_vars_ue,
unsigned char l, unsigned char l,
unsigned char symbol); 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 #ifdef EMOS
......
...@@ -81,7 +81,10 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, ...@@ -81,7 +81,10 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
u8 RCC; u8 RCC;
u32 nsymb = (frame_parms->Ncp==NORMAL) ? 14:12; 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 second_pilot = (frame_parms->Ncp==NORMAL) ? 4 : 3;
u32 jj=0; u32 jj=0;
u32 re_allocated=0; u32 re_allocated=0;
...@@ -230,10 +233,14 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch, ...@@ -230,10 +233,14 @@ int generate_pbch(LTE_eNB_PBCH *eNB_pbch,
for (l=(nsymb>>1);l<(nsymb>>1)+4;l++) { for (l=(nsymb>>1);l<(nsymb>>1)+4;l++) {
pilots=0; pilots=0;
#ifdef INTERFERENCE_MITIGATION
pilots_2 = 0; pilots_2 = 0;
#endif
if ((l==0) || (l==(nsymb>>1))){ if ((l==0) || (l==(nsymb>>1))){
pilots=1; pilots=1;
#ifdef INTERFERENCE_MITIGATION
pilots_2=1; pilots_2=1;
#endif
} }
if ((l==1) || (l==(nsymb>>1)+1)){ if ((l==1) || (l==(nsymb>>1)+1)){
......
...@@ -625,7 +625,8 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -625,7 +625,8 @@ void mch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
__m128i xmm1,xmm2,*ch_mag,*ch_magb; __m128i xmm1,xmm2,*ch_mag,*ch_magb;
__m128i *rxF = (__m128i*)&rxdataF_comp[0][(symbol*frame_parms->N_RB_DL*12)]; __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; unsigned char len_mod4;
short *llr; short *llr;
s16 *llr2; s16 *llr2;
......
...@@ -21,7 +21,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, ...@@ -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 nb_prefix_samples0 = frame_parms->ofdm_symbol_size>>2;//(no_prefix ? 0 : frame_parms->nb_prefix_samples0);
unsigned int subframe_offset; unsigned int subframe_offset;
int i; // int i;
unsigned int frame_length_samples = frame_parms->samples_per_tti * 10; unsigned int frame_length_samples = frame_parms->samples_per_tti * 10;
void (*dft)(int16_t *,int16_t *, int); void (*dft)(int16_t *,int16_t *, int);
...@@ -161,7 +161,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue, ...@@ -161,7 +161,7 @@ int slot_fep_mbsfn(PHY_VARS_UE *phy_vars_ue,
i+1, i+1,
subframe, subframe,
l); l);
/* lte_dl_channel_estimation(phy_vars_ue,eNB_id,0, lte_dl_channel_estimation(phy_vars_ue,eNB_id,0,
Ns, Ns,
aa, aa,
l, l,
......
...@@ -230,7 +230,6 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ ...@@ -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; mac_rlc_status_resp_t rlc_status;
u8 dcch_header_len=0; u8 dcch_header_len=0;
u16 sdu_lengths[8]; u16 sdu_lengths[8];
u8 sdu_lcids[8];
u8 ulsch_buff[MAX_ULSCH_PAYLOAD_BYTES]; u8 ulsch_buff[MAX_ULSCH_PAYLOAD_BYTES];
if (UE_mode == PRACH) { if (UE_mode == PRACH) {
...@@ -310,8 +309,6 @@ PRACH_RESOURCES_t *ue_get_rach(u8 Mod_id,u32 frame, u8 eNB_index,u8 subframe){ ...@@ -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, sdu_lengths[0] = mac_rlc_data_req(Mod_id+NB_eNB_INST,frame,RLC_MBMS_NO,
DCCH, DCCH,
(char *)&ulsch_buff[0]); (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]); 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]); update_bsr(Mod_id, frame, DCCH,UE_mac_inst[Mod_id].scheduling_info.LCGID[DCCH]);
......
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
#include "UTIL/LOG/log.h" #include "UTIL/LOG/log.h"
#include "OCG.h" #include "OCG.h"
#include "OCG_extern.h" #include "OCG_extern.h"
#if defined(USER_MODE) && defined(OAI_EMU)
# include "UTIL/OPT/opt.h"
#endif
#define DEBUG_RAR #define DEBUG_RAR
......
...@@ -101,9 +101,12 @@ int pdcp_fifo_flush_sdus (u32_t frame,u8 eNB_flag) ...@@ -101,9 +101,12 @@ int pdcp_fifo_flush_sdus (u32_t frame,u8 eNB_flag)
int bytes_wrote = 0; int bytes_wrote = 0;
int pdcp_nb_sdu_sent = 0; int pdcp_nb_sdu_sent = 0;
u8 cont = 1; u8 cont = 1;
int ret;
int mcs_inst; int mcs_inst;
#if defined(NAS_NETLINK) && defined(LINUX)
int ret = 0;
#endif
while (sdu && cont) { while (sdu && cont) {
#if defined(OAI_EMU) #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 ...@@ -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; u8 pdcp_mode, is_ue=0;
Packet_otg_elt * otg_pkt_info; 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. // we need to add conditions to avoid transmitting data when the UE is not RRC connected.
#if defined(USER_MODE) && defined(OAI_EMU) #if defined(USER_MODE) && defined(OAI_EMU)
if (oai_emulation.info.otg_enabled ==1 ){ 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 ...@@ -744,7 +749,6 @@ void pdcp_fifo_read_input_sdus_from_otg (u32_t frame, u8_t eNB_flag, u8 UE_index
#else #else
if ((otg_enabled==1) && (eNB_flag == 1)) { // generate DL traffic if ((otg_enabled==1) && (eNB_flag == 1)) { // generate DL traffic
unsigned int ctime=0; unsigned int ctime=0;
src_id = eNB_index;
ctime = frame * 100; ctime = frame * 100;
/*if ((mac_get_rrc_status(eNB_index, eNB_flag, 0 ) > 2) && /*if ((mac_get_rrc_status(eNB_index, eNB_flag, 0 ) > 2) &&
......
...@@ -68,7 +68,7 @@ static mapping rrc_status_names[] = { ...@@ -68,7 +68,7 @@ static mapping rrc_status_names[] = {
int dump_eNB_l2_stats(char *buffer, int length){ 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; int len= length;
#ifdef EXMIMO #ifdef EXMIMO
......
...@@ -356,8 +356,8 @@ void logRecord(const char *file, const char *func, int line, int comp, ...@@ -356,8 +356,8 @@ void logRecord(const char *file, const char *func, int line, int comp,
va_end(args); va_end(args);
//2 first parameters must be passed as 'const' to the thread function //2 first parameters must be passed as 'const' to the thread function
log_params.file = file; log_params.file = strdup(file);
log_params.func = func; log_params.func = strdup(func);
log_params.line = line; log_params.line = line;
log_params.comp = comp; log_params.comp = comp;
log_params.level = level; log_params.level = level;
......
...@@ -179,11 +179,11 @@ int get_oai_entry(char *sumo_id, Map_list Map_Vector) { ...@@ -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 remove_oai_entry(char *sumo_id, Map_list Map_Vector) {
Map_list tmp = Map_Vector; Map_list tmp = Map_Vector;
Map_list entry; // Map_list entry;
//printf("removing entry %s \n",sumo_id); //printf("removing entry %s \n",sumo_id);
if (strcmp(tmp->map->sumo_id, sumo_id) == 0) { if (strcmp(tmp->map->sumo_id, sumo_id) == 0) {
//printf("1: found it %s \n",tmp->map->sumo_id); //printf("1: found it %s \n",tmp->map->sumo_id);
int id = tmp->map->oai_id; // int id = tmp->map->oai_id;
// free(tmp); // free(tmp);
if(tmp->next == NULL) if(tmp->next == NULL)
return NULL; return NULL;
...@@ -202,8 +202,8 @@ Map_list remove_oai_entry(char *sumo_id, Map_list Map_Vector) { ...@@ -202,8 +202,8 @@ Map_list remove_oai_entry(char *sumo_id, Map_list Map_Vector) {
while (tmp->next != NULL){ while (tmp->next != NULL){
if (strcmp(tmp->next->map->sumo_id, sumo_id) == 0) { if (strcmp(tmp->next->map->sumo_id, sumo_id) == 0) {
//printf("2: found it %s \n",tmp->next->map->sumo_id); //printf("2: found it %s \n",tmp->next->map->sumo_id);
int id = tmp->next->map->oai_id; // int id = tmp->next->map->oai_id;
entry = tmp->next; // save the entry to remove // entry = tmp->next; // save the entry to remove
tmp->next = tmp->next->next; // jump over the entry to be removed tmp->next = tmp->next->next; // jump over the entry to be removed
// free(entry); // freeing the entry // free(entry); // freeing the entry
//if(strcmp(tmp->next->map->sumo_id, "0") == 0) //if(strcmp(tmp->next->map->sumo_id, "0") == 0)
......
...@@ -148,7 +148,7 @@ storage * receiveExact(){ ...@@ -148,7 +148,7 @@ storage * receiveExact(){
tracker = writePacket(bufLength, 4); tracker = writePacket(bufLength, 4);
// store pointer to free the space later // store pointer to free the space later
storage *freeTracker = tracker; // storage *freeTracker = tracker;
int s= readInt(); int s= readInt();
int NN = s - 4; int NN = s - 4;
printf("debug \n"); printf("debug \n");
......
...@@ -78,7 +78,7 @@ sprintf(sumo_line, "%s -c %s ",omg_param_list.sumo_command, omg_param_list.sumo_ ...@@ -78,7 +78,7 @@ sprintf(sumo_line, "%s -c %s ",omg_param_list.sumo_command, omg_param_list.sumo_
arrived = NULL; arrived = NULL;
// switch on error to return to OAI // 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); init(omg_param_list.sumo_end - omg_param_list.sumo_start);
......
...@@ -50,7 +50,6 @@ extern hash_table_t* table; ...@@ -50,7 +50,6 @@ extern hash_table_t* table;
int start_trace_generator(omg_global_param omg_param_list) { int start_trace_generator(omg_global_param omg_param_list) {
NodePtr node = NULL;
// MobilityPtr mobility = NULL; // MobilityPtr mobility = NULL;
//read the mobility file here //read the mobility file here
...@@ -85,7 +84,7 @@ int deploy_nodes() { ...@@ -85,7 +84,7 @@ int deploy_nodes() {
NodePtr node = NULL; NodePtr node = NULL;
int count = 0; // int count = 0;
node_info * head_node = head_node_info; node_info * head_node = head_node_info;
while (head_node!=NULL){ while (head_node!=NULL){
...@@ -235,7 +234,7 @@ Pair move_trace_node(NodePtr node, double cur_time) { ...@@ -235,7 +234,7 @@ Pair move_trace_node(NodePtr node, double cur_time) {
return keep_awake_trace_node(node,cur_time,9999,1); return keep_awake_trace_node(node,cur_time,9999,1);
} }
else{ // location discription available 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); LOG_D(OMG, "Location fetch : (%.2f, %.2f)\n", next_loc->x, next_loc->y);
double X_next; double X_next;
......
...@@ -56,7 +56,7 @@ This header file must be included */ ...@@ -56,7 +56,7 @@ This header file must be included */
#ifndef project_include #ifndef project_include
#define project_include #define project_include
#include "UTIL/LOG/log_if.h" #include "UTIL/LOG/log_if.h"
#include "UTIL/LOG/log_extern.h" // #include "UTIL/LOG/log_extern.h"
#include "PHY/defs.h" #include "PHY/defs.h"
#include "PHY/extern.h" #include "PHY/extern.h"
#include "PHY/impl_defs_lte.h" #include "PHY/impl_defs_lte.h"
......
#include "otg_form.h" #include "otg_form.h"
#include "otg_vars.h" #include "otg_vars.h"
#include "otg_kpi.h"
extern unsigned char NB_eNB_INST; extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST; extern unsigned char NB_UE_INST;
...@@ -150,7 +150,7 @@ if (otg_forms_info->idx_ul[src][dst]==MAX_SAMPLES-1){ ...@@ -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); sprintf(loss_rate, "%s%d","NB Loss pkts UL=", otg_info->total_loss_ul);
fl_set_object_label(form_ul->loss_ratio, loss_rate); fl_set_object_label(form_ul->loss_ratio, loss_rate);
sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime); sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime);
...@@ -170,7 +170,7 @@ if (otg_forms_info->idx_ul[src][dst]==MAX_SAMPLES-1){ ...@@ -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(form_ul->throughput, 0, curve_label);
fl_set_xyplot_key_position(form_ul->throughput, x_key_position,y_key_position , FL_ALIGN_BOTTOM_LEFT); 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); sprintf(loss_rate, "%s%d","NB Loss pkts UL=",otg_info->total_loss_ul);
fl_set_object_label(form_ul->loss_ratio, loss_rate); fl_set_object_label(form_ul->loss_ratio, loss_rate);
sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime); sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime);
...@@ -245,7 +245,7 @@ if (otg_forms_info->idx_dl[src][dst]==MAX_SAMPLES-1){ ...@@ -245,7 +245,7 @@ if (otg_forms_info->idx_dl[src][dst]==MAX_SAMPLES-1){
sprintf(curve_label, "%d%s%d", src,"-->", dst); sprintf(curve_label, "%d%s%d", src,"-->", dst);
fl_set_xyplot_key(form_dl->throughput, 0, curve_label); 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); 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); sprintf(loss_rate, "%s%d","NB Loss pkts DL=",otg_info->total_loss_dl);
fl_set_object_label(form_dl->loss_ratio, loss_rate); 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){ ...@@ -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(form_dl->throughput, 0, curve_label);
fl_set_xyplot_key_position(form_dl->throughput,x_key_position,y_key_position, FL_ALIGN_BOTTOM_LEFT); 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); sprintf(loss_rate, "%s%d","NB Loss pkts DL=",otg_info->total_loss_dl);
fl_set_object_label(form_dl->loss_ratio, loss_rate); fl_set_object_label(form_dl->loss_ratio, loss_rate);
sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime); sprintf(simu_time, "%s%d","Simulation Time(ms)=", ctime);
......
...@@ -122,7 +122,7 @@ void rx_loss_rate_bytes(int src, int dst, int application){ ...@@ -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; unsigned int i,j,k;
otg_info->total_loss_dl=0; otg_info->total_loss_dl=0;
......
...@@ -105,6 +105,6 @@ void add_log_metric(int src, int dst, int ctime, double metric, unsigned int lab ...@@ -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 add_log_label(unsigned int label, unsigned int * start_log_metric);
void nb_loss_pkts(); void otg_kpi_nb_loss_pkts(void);
#endif #endif
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