From ec7d0ff2c3518b9472fa781ab48595c8fd0a68a7 Mon Sep 17 00:00:00 2001 From: Rohit Gupta <rohit.gupta@eurecom.fr> Date: Sun, 2 Oct 2016 00:24:25 +0200 Subject: [PATCH] fix compilation warnings --- openair2/LAYER2/MAC/eNB_scheduler_dlsch.c | 2 +- openair2/RRC/LITE/rrc_eNB_S1AP.c | 1 - openair2/RRC/LITE/rrc_eNB_S1AP.h | 8 ++++++++ openair3/NAS/TOOLS/usim_data.c | 3 +-- openair3/NAS/UE/API/USIM/usim_api.c | 2 +- targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c | 2 +- targets/RT/USER/lte-softmodem.c | 3 ++- targets/RT/USER/lte-ue.c | 15 +++++++++++++-- targets/SIMU/USER/oaisim.c | 10 ++-------- targets/SIMU/USER/oaisim_functions.c | 6 ------ 10 files changed, 29 insertions(+), 23 deletions(-) diff --git a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c index 91af77ad59b..cf64b7bb605 100644 --- a/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c +++ b/openair2/LAYER2/MAC/eNB_scheduler_dlsch.c @@ -434,7 +434,7 @@ schedule_ue_spec( int N_RBG[MAX_NUM_CCs]; unsigned char aggregation; mac_rlc_status_resp_t rlc_status; - unsigned char header_len_dcch=0, header_len_dcch_tmp=0, header_len_dcch_last=0; + unsigned char header_len_dcch=0, header_len_dcch_tmp=0; unsigned char header_len_dtch=0, header_len_dtch_tmp=0, header_len_dtch_last=0; unsigned char ta_len=0; unsigned char sdu_lcids[NB_RB_MAX],lcid,offset,num_sdus=0; diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.c b/openair2/RRC/LITE/rrc_eNB_S1AP.c index 33d076b9f6a..50d15c31af2 100644 --- a/openair2/RRC/LITE/rrc_eNB_S1AP.c +++ b/openair2/RRC/LITE/rrc_eNB_S1AP.c @@ -1259,7 +1259,6 @@ int rrc_eNB_process_S1AP_E_RAB_SETUP_REQ(MessageDef *msg_p, const char *msg_name { uint16_t ue_initial_id; uint32_t eNB_ue_s1ap_id; - MessageDef *message_gtpv1u_p = NULL; gtpv1u_enb_create_tunnel_req_t create_tunnel_req; gtpv1u_enb_create_tunnel_resp_t create_tunnel_resp; diff --git a/openair2/RRC/LITE/rrc_eNB_S1AP.h b/openair2/RRC/LITE/rrc_eNB_S1AP.h index 0beebc72c1e..f199931bbb2 100644 --- a/openair2/RRC/LITE/rrc_eNB_S1AP.h +++ b/openair2/RRC/LITE/rrc_eNB_S1AP.h @@ -79,6 +79,14 @@ rrc_eNB_S1AP_remove_ue_ids( eNB_RRC_INST* const rrc_instance_pP, struct rrc_ue_s1ap_ids_s* const ue_ids_pP ); + +void +rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* const ctxt_pP, + rrc_eNB_ue_context_t* const ue_context_pP, + const uint8_t ho_state + ); + + /*! \fn void rrc_eNB_send_S1AP_INITIAL_CONTEXT_SETUP_RESP(uint8_t mod_id, uint8_t ue_index) *\brief create a S1AP_INITIAL_CONTEXT_SETUP_RESP for S1AP. *\param ctxt_pP Running context. diff --git a/openair3/NAS/TOOLS/usim_data.c b/openair3/NAS/TOOLS/usim_data.c index ffde00c2689..1835f0b8b12 100644 --- a/openair3/NAS/TOOLS/usim_data.c +++ b/openair3/NAS/TOOLS/usim_data.c @@ -185,12 +185,11 @@ int main (int argc, const char* argv[]) usim_data.imsi.u.num.digit15 = 0b1111; #endif #if (SELECTED_PLMN == OAI_LTEBOX) -#warning "IMSI 208.93.00001111" /* * International Mobile Subscriber Identity * IMSI = MCC + MNC + MSIN = 208 (France) + 10 (SFR) + 00001234 */ - #warning "IMSI 208.93.0100001110" +#warning "IMSI 208.93.0100001111" usim_data.imsi.length = 8; usim_data.imsi.u.num.parity = ODD_PARITY; // Parity: even usim_data.imsi.u.num.digit1 = 2; // MCC digit 1 diff --git a/openair3/NAS/UE/API/USIM/usim_api.c b/openair3/NAS/UE/API/USIM/usim_api.c index 807ee467242..b0ccbf9504a 100644 --- a/openair3/NAS/UE/API/USIM/usim_api.c +++ b/openair3/NAS/UE/API/USIM/usim_api.c @@ -49,7 +49,7 @@ Description Implements the API used by the NAS layer to read/write #include "usim_api.h" #include "nas_log.h" #include "memory.h" - +#include <stdio.h> #include "aka_functions.h" #include <string.h> // memcpy, memset #include <stdlib.h> // malloc, free diff --git a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c index 48c24a0c043..cf1d2e576f0 100644 --- a/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c +++ b/targets/ARCH/BLADERF/USERSPACE/LIB/bladerf_lib.c @@ -233,7 +233,7 @@ int trx_brf_reset_stats(openair0_device* device) { * \param card the hardware to use * \returns 0 in success */ -int trx_brf_stop(int card) { +int trx_brf_stop(openair0_device* device) { return(0); diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 96645f886a1..390c2ac13f4 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -108,6 +108,7 @@ unsigned short config_frames[4] = {2,9,11,13}; # include "s1ap_eNB.h" #ifdef PDCP_USE_NETLINK # include "SIMULATION/ETH_TRANSPORT/proto.h" +extern int netlink_init(void); #endif # endif #endif @@ -1364,7 +1365,7 @@ void init_openair0() { int main( int argc, char **argv ) { - int i,aa,card=0; + int i,aa; #if defined (XFORMS) void *status; #endif diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 649e1f009be..1c338c3df08 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -187,6 +187,9 @@ void init_UE(int nb_inst) { UE = PHY_vars_UE_g[inst][0]; ret = openair0_device_load(&(UE->rfdevice), &openair0_cfg[0]); + if (ret !=0){ + exit_fun("Error loading device library"); + } UE->rfdevice.host_type = BBU_HOST; // UE->rfdevice.type = NONE_DEV; error_code = pthread_create(&UE->proc.pthread_ue, &UE->proc.attr_ue, UE_thread, NULL); @@ -1062,7 +1065,11 @@ void *UE_thread(void *arg) { UE->frame_parms.samples_per_tti, UE->frame_parms.nb_antennas_tx, 1); - + if (txs != UE->frame_parms.samples_per_tti) { + LOG_E(PHY,"TX : Timeout (sent %d/%d)\n",txs, UE->frame_parms.samples_per_tti); + exit_fun( "problem transmitting samples" ); + } + VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 ); } @@ -1088,7 +1095,10 @@ void *UE_thread(void *arg) { UE->frame_parms.samples_per_tti - rx_off_diff, UE->frame_parms.nb_antennas_tx, 1); - + if (txs != UE->frame_parms.samples_per_tti - rx_off_diff) { + LOG_E(PHY,"TX : Timeout (sent %d/%d)\n",txs, UE->frame_parms.samples_per_tti-rx_off_diff); + exit_fun( "problem transmitting samples" ); + } VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_WRITE, 0 ); // read in first symbol of next frame and adjust for timing drift @@ -1170,6 +1180,7 @@ void *UE_thread(void *arg) { } // UE->is_synchronized==1 } // while !oai_exit + return NULL; } // UE_thread /* diff --git a/targets/SIMU/USER/oaisim.c b/targets/SIMU/USER/oaisim.c index 345af74d184..452518eae89 100644 --- a/targets/SIMU/USER/oaisim.c +++ b/targets/SIMU/USER/oaisim.c @@ -212,6 +212,8 @@ sigh (void *arg); void oai_shutdown (void); +void reset_opp_meas_oaisim (void); + void help (void) { @@ -444,9 +446,6 @@ static Data_Flow_Unit omv_data; #endif //ALU static module_id_t UE_inst = 0; static module_id_t eNB_inst = 0; -#ifdef Rel10 -static module_id_t RN_id = 0; -#endif Packet_OTG_List_t *otg_pdcp_buffer; @@ -470,13 +469,8 @@ l2l1_task (void *args_p) // Framing variables int32_t sf; -#ifdef Rel10 - relaying_type_t r_type = no_relay; // no relaying -#endif - char fname[64], vname[64]; - protocol_ctxt_t ctxt; //#ifdef XFORMS // current status is that every UE has a DL scope for a SINGLE eNB (eNB_id=0) // at eNB 0, an UL scope for every UE diff --git a/targets/SIMU/USER/oaisim_functions.c b/targets/SIMU/USER/oaisim_functions.c index 97820d2886b..2b19e30a9b4 100644 --- a/targets/SIMU/USER/oaisim_functions.c +++ b/targets/SIMU/USER/oaisim_functions.c @@ -1011,8 +1011,6 @@ int eNB_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void * int CC_id = device->CC_id; int subframe; - int ready_for_new_subframe=0; - int subframe_eNB_mask_local; int sample_count=0; *ptimestamp = last_eNB_rx_timestamp[eNB_id][CC_id]; @@ -1064,8 +1062,6 @@ int UE_trx_read(openair0_device *device, openair0_timestamp *ptimestamp, void ** int UE_id = device->Mod_id; int CC_id = device->CC_id; int subframe; - int ready_for_new_subframe=0; - int subframe_UE_mask_local; int sample_count=0; int read_size; @@ -1329,8 +1325,6 @@ void init_openair1(void) void init_openair2(void) { #ifdef OPENAIR2 - module_id_t enb_id; - module_id_t UE_id; int CC_id; //#warning "eNB index is hard coded to zero" -- GitLab