Commit ddd76fad authored by Lionel Gauthier's avatar Lionel Gauthier

patches13/0022-fix-compiler-warnings.patch

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7068 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 35baba67
......@@ -367,6 +367,7 @@ void compute_beta8(llr_t* alpha,llr_t* beta,llr_t *m_11,llr_t* m_10,unsigned sho
loopval=(frame_length>>4)-L,rerun_flag++) {
if (offset8_flag==0) {
DevMessage( "beta0-beta7 are used uninitialized. FIXME!" );
beta_ptr[0] = _mm_insert_epi8(beta_ptr[0],beta0,15);
beta_ptr[1] = _mm_insert_epi8(beta_ptr[1],beta1,15);
beta_ptr[2] = _mm_insert_epi8(beta_ptr[2],beta2,15);
......
......@@ -1157,7 +1157,7 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
phy_vars_ue->sinr_CQI_dB = (double*) malloc16_clear( frame_parms->N_RB_DL*12*sizeof(double) );
phy_vars_ue->init_averaging = 1;
phy_vars_ue->pdsch_config_dedicated->p_a = PDSCH_ConfigDedicated__p_a_dB0; // default value until overwritten by RRCConnectionReconfiguration
phy_vars_ue->pdsch_config_dedicated->p_a = dB0; // default value until overwritten by RRCConnectionReconfiguration
// set channel estimation to do linear interpolation in time
phy_vars_ue->high_speed_flag = 1;
......@@ -1403,7 +1403,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *phy_vars_eNB,
for (UE_id=0;UE_id<NUMBER_OF_UE_MAX;UE_id++)
phy_vars_eNB->eNB_UE_stats_ptr[UE_id] = &phy_vars_eNB->eNB_UE_stats[UE_id];
phy_vars_eNB->pdsch_config_dedicated->p_a = PDSCH_ConfigDedicated__p_a_dB0; //defaul value until overwritten by RRCConnectionReconfiguration
phy_vars_eNB->pdsch_config_dedicated->p_a = dB0; //defaul value until overwritten by RRCConnectionReconfiguration
init_prach_tables(839);
......
......@@ -56,7 +56,7 @@ void lte_sync_timefreq(PHY_VARS_UE *ue,int band,unsigned int DL_freq) {
UE_SCAN_INFO_t *scan_info = &ue->scan_info[band];
int16_t spectrum[12288] __attribute__((aligned(16)));
int16_t spectrum_p5ms[12288] __attribute__((aligned(16)));
int i,f,f2,band_idx;
int i,f,band_idx;
__m128i autocorr0[256/4],autocorr1[256/4],autocorr2[256/4];
__m128i autocorr0_t[256/4],autocorr1_t[256/4],autocorr2_t[256/4];
__m128i tmp_t[256/4];
......
......@@ -58,12 +58,10 @@ void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch) {
free16(dlsch->harq_processes[i]->b,MAX_DLSCH_PAYLOAD_BYTES);
dlsch->harq_processes[i]->b = NULL;
}
if (dlsch->harq_processes[i]->c) {
for (r=0;r<MAX_NUM_DLSCH_SEGMENTS;r++) {
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
dlsch->harq_processes[i]->c[r] = NULL;
}
}
for (r=0;r<MAX_NUM_DLSCH_SEGMENTS;r++)
if (dlsch->harq_processes[i]->d[r]) {
free16(dlsch->harq_processes[i]->d[r],((3*8*6144)+12+96)*sizeof(short));
......
......@@ -368,7 +368,7 @@ unsigned char SE2I_TBS(float SE,
unsigned char symbPerRB) {
unsigned char I_TBS= -1;
int throughPutGoal = 0;
short diffOld = abs(TBStable[0][N_PRB-1] - throughPutGoal);
short diffOld = TBStable[0][N_PRB-1] - throughPutGoal; // always positive because of unsigned arithmetic
short diffNew = diffOld;
int i = 0;
throughPutGoal = (int)(((SE*1024)*N_PRB*symbPerRB*12)/1024);
......@@ -377,7 +377,7 @@ unsigned char SE2I_TBS(float SE,
#endif
I_TBS = 0;
for (i = 0; i<TBStable_rowCnt; i++) {
diffNew = abs(TBStable[i][N_PRB-1] - throughPutGoal);
diffNew = TBStable[i][N_PRB-1] - throughPutGoal; // always positive because of unsigned arithmetic
if (diffNew <= diffOld) {
diffOld = diffNew;
I_TBS = i;
......
......@@ -86,7 +86,6 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch) {
msg("Freeing ulsch process %d b (%p)\n",i,ulsch->harq_processes[i]->b);
#endif
}
if (ulsch->harq_processes[i]->c) {
#ifdef DEBUG_ULSCH_FREE
msg("Freeing ulsch process %d c (%p)\n",i,ulsch->harq_processes[i]->c);
#endif
......@@ -100,7 +99,6 @@ void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch) {
ulsch->harq_processes[i]->c[r] = NULL;
}
}
}
free16(ulsch->harq_processes[i],sizeof(LTE_UL_UE_HARQ_t));
ulsch->harq_processes[i] = NULL;
}
......
......@@ -77,12 +77,10 @@ void free_eNB_ulsch(LTE_eNB_ULSCH_t *ulsch) {
free16(ulsch->harq_processes[i]->b,MAX_ULSCH_PAYLOAD_BYTES);
ulsch->harq_processes[i]->b = NULL;
}
if (ulsch->harq_processes[i]->c) {
for (r=0;r<MAX_NUM_ULSCH_SEGMENTS;r++) {
free16(ulsch->harq_processes[i]->c[r],((r==0)?8:0) + 768);
ulsch->harq_processes[i]->c[r] = NULL;
}
}
for (r=0;r<MAX_NUM_ULSCH_SEGMENTS;r++)
if (ulsch->harq_processes[i]->d[r]) {
free16(ulsch->harq_processes[i]->d[r],((3*8*6144)+12+96)*sizeof(short));
......
......@@ -343,7 +343,7 @@ void eNB_dlsch_ulsch_scheduler(module_id_t module_idP,uint8_t cooperation_flag,
// FDD normal UL/DLSCH
schedule_SI(module_idP,frameP,nprb,nCCE);
//schedule_RA(module_idP,frameP,subframeP,5,nprb,nCCE);
if ((mac_xface->lte_frame_parms->frame_type == FDD) ) {
if (mac_xface->lte_frame_parms->frame_type == FDD) {
// schedule_RA(module_idP,frameP,subframeP,1,nprb,nCCE);
// schedule_ulsch(module_idP,frameP,cooperation_flag,5,9,nCCE);
fill_DLSCH_dci(module_idP,frameP,subframeP,RBalloc,0,mbsfn_status);
......
......@@ -240,7 +240,7 @@ int add_new_ue(module_id_t mod_idP, int cc_idP, rnti_t rntiP,int harq_pidP) {
UE_list->UE_template[cc_idP][UE_id].oldNDI_UL[j] = (j==harq_pidP)?0:1; // 1st transmission is with Msg3;
}
eNB_ulsch_info[mod_idP][cc_idP][UE_id].status = S_UL_WAITING;
eNB_dlsch_info[mod_idP][cc_idP][UE_id].status = S_UL_WAITING;
eNB_dlsch_info[mod_idP][cc_idP][UE_id].status = S_DL_WAITING;
LOG_D(MAC,"[eNB %d] Add UE_id %d on Primary CC_id %d: rnti %x\n",mod_idP,UE_id,cc_idP,rntiP);
dump_ue_list(UE_list,0);
return(UE_id);
......@@ -726,13 +726,13 @@ uint32_t allocate_prbs_sub(int nb_rb, uint8_t *rballoc) {
nb_rb--;
break;
case 25:
if ((check == mac_xface->lte_frame_parms->N_RBG-1))
if (check == mac_xface->lte_frame_parms->N_RBG-1)
nb_rb--;
else
nb_rb-=2;
break;
case 50:
if ((check == mac_xface->lte_frame_parms->N_RBG-1))
if (check == mac_xface->lte_frame_parms->N_RBG-1)
nb_rb-=2;
else
nb_rb-=3;
......
......@@ -1480,7 +1480,7 @@ UE_L2_STATE_t ue_scheduler(module_id_t module_idP,frame_t frameP, sub_frame_t su
}
}
// UE has no valid phy config dedicated || no valid/released SR
if ((UE_mac_inst[module_idP].physicalConfigDedicated == NULL)) {
if (UE_mac_inst[module_idP].physicalConfigDedicated == NULL) {
// cancel all pending SRs
UE_mac_inst[module_idP].scheduling_info.SR_pending=0;
UE_mac_inst[module_idP].ul_active=0;
......
......@@ -91,7 +91,7 @@ void config_req_rlc_um (
rb_idP); }
}
//-----------------------------------------------------------------------------
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};
void config_req_rlc_um_asn1 (
const protocol_ctxt_t* const ctxt_pP,
......
......@@ -320,7 +320,7 @@ void rrc_ue_generate_RRCConnectionRequest(module_id_t ue_mod_idP, frame_t frameP
mui_t rrc_mui=0;
/* NAS Attach request with IMSI */
static const char const nas_attach_req_imsi[] =
static const char nas_attach_req_imsi[] =
{
0x07, 0x41,
/* EPS Mobile identity = IMSI */
......@@ -335,7 +335,7 @@ static const char const nas_attach_req_imsi[] =
};
/* NAS Attach request with GUTI */
static const char const nas_attach_req_guti[] =
static const char nas_attach_req_guti[] =
{
0x07, 0x41,
/* EPS Mobile identity = GUTI */
......@@ -1201,7 +1201,7 @@ void rrc_ue_process_securityModeCommand(uint8_t ue_mod_idP, frame_t frameP,Secur
if (securityModeCommand->criticalExtensions.choice.c1.present == SecurityModeCommand__criticalExtensions__c1_PR_securityModeCommand_r8) {
ul_dcch_msg.message.choice.c1.choice.securityModeComplete.rrc_TransactionIdentifier = securityModeCommand->rrc_TransactionIdentifier;
ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.present = SecurityModeCommand__criticalExtensions_PR_c1;
ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.present = SecurityModeCommand__criticalExtensions_PR_c1; // FIXME wrong enum types
ul_dcch_msg.message.choice.c1.choice.securityModeComplete.criticalExtensions.choice.securityModeComplete_r8.nonCriticalExtension =NULL;
LOG_I(RRC,"[UE %d] Frame %d: Receiving from SRB1 (DL-DCCH), encoding securityModeComplete (eNB %d)\n",
......@@ -1882,8 +1882,6 @@ decode_BCCH_DLSCH_Message(
//memset(&bcch_message,0,sizeof(BCCH_DL_SCH_Message_t));
LOG_D(RRC,"[UE %d] Decoding DL_BCCH_DLSCH_Message\n",ue_mod_idP);
int i;
dec_rval = uper_decode_complete(NULL,
&asn_DEF_BCCH_DL_SCH_Message,
......
......@@ -344,11 +344,8 @@ void rrc_t310_expiration(const frame_t frameP, uint8_t Mod_id, uint8_t eNB_index
}
}
RRC_status_t rrc_rx_tx(uint8_t Mod_id, const frame_t frameP, const eNB_flag_t eNB_flagP,uint8_t index,int CC_id){
uint8_t UE_id;
int32_t current_timestamp_ms, ref_timestamp_ms;
struct timeval ts;
RRC_status_t rrc_rx_tx(uint8_t Mod_id, const frame_t frameP, const eNB_flag_t eNB_flagP,uint8_t index,int CC_id)
{
if(eNB_flagP == 0) {
// check timers
......@@ -427,14 +424,16 @@ RRC_status_t rrc_rx_tx(uint8_t Mod_id, const frame_t frameP, const eNB_flag_t eN
check_handovers(Mod_id,frameP);
// counetr, and get the value and aggregate
#ifdef LOCALIZATION
int32_t current_timestamp_ms, ref_timestamp_ms;
struct timeval ts;
/* for the localization, only primary CC_id might be relevant*/
gettimeofday(&ts, NULL);
current_timestamp_ms = ts.tv_sec * 1000 + ts.tv_usec / 1000;
ref_timestamp_ms = eNB_rrc_inst[Mod_id].reference_timestamp_ms;
for (UE_id=0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
for (uint8_t UE_id=0; UE_id < NUMBER_OF_UE_MAX; UE_id++) {
if ((current_timestamp_ms - ref_timestamp_ms > eNB_rrc_inst[Mod_id].aggregation_period_ms) &&
rrc_get_estimated_ue_distance(Mod_id,frameP,UE_id, CC_id,eNB_rrc_inst[Mod_id].loc_type) != -1) {
......
......@@ -1090,7 +1090,7 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportInterval = ReportInterval_ms120;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.reportAmount = ReportConfigEUTRA__reportAmount_infinity;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis = 0.5;
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.hysteresis = 0.5; // FIXME ...hysteresis is of type long!
ReportConfig_A3->reportConfig.choice.reportConfigEUTRA.triggerType.choice.event.timeToTrigger =
TimeToTrigger_ms40;
ASN_SEQUENCE_ADD(&ReportConfig_list->list, ReportConfig_A3);
......@@ -1202,12 +1202,11 @@ static void rrc_eNB_generate_defaultRRCConnectionReconfiguration(
ASN_SEQUENCE_ADD(&dedicatedInfoNASList->list, dedicatedInfoNas);
}
/* TODO parameters yet to process ... */
{
/* TODO parameters yet to process ...
UE_info->e_rab[i].param.qos;
UE_info->e_rab[i].param.sgw_addr;
UE_info->e_rab[i].param.gtp_teid;
}
*/
/* TODO should test if e RAB are Ok before! */
eNB_rrc_inst[enb_mod_idP].Info.UE[ue_mod_idP].e_rab[i].status = E_RAB_STATUS_DONE;
......
......@@ -176,12 +176,13 @@ get_free_mem_block (uint16_t sizeP)
int pool_selected;
int size;
if (sizeP > MEM_MNGT_MB12_BLOCK_SIZE) {
msg ("[MEM_MNGT][ERROR][FATAL] size requested %d out of bounds\n", sizeP);
display_mem_load ();
mac_xface->macphy_exit("[MEM_MNGT][ERROR][FATAL] get_free_mem_block size requested out of bounds");
return NULL;
}
// next block commented, because sizeP > MEM_MNGT_MB12_BLOCK_SIZE can never be true.
// if (sizeP > MEM_MNGT_MB12_BLOCK_SIZE) {
// msg ("[MEM_MNGT][ERROR][FATAL] size requested %d out of bounds\n", sizeP);
// display_mem_load ();
// mac_xface->macphy_exit("[MEM_MNGT][ERROR][FATAL] get_free_mem_block size requested out of bounds");
// return NULL;
// }
size = sizeP >> 6;
pool_selected = 0;
......
......@@ -177,7 +177,7 @@ float owd_const_application_v=owd_const_application()/2;
if (otg_info->rx_pkt_owd_history[src][dst][1] == 0) // first packet
otg_info->rx_pkt_jitter[src][dst]=0;
else // for the consecutive packets
otg_info->rx_pkt_jitter[src][dst]= abs(otg_info->rx_pkt_owd_history[src][dst][0] - otg_info->rx_pkt_owd_history[src][dst][1]);
otg_info->rx_pkt_jitter[src][dst] = fabsf(otg_info->rx_pkt_owd_history[src][dst][0] - otg_info->rx_pkt_owd_history[src][dst][1]);
LOG_D(OTG,"The packet jitter for the pair (src %d, dst %d)) at %d is %lf (current %lf, previous %lf) \n",
src, dst, ctime, otg_info->rx_pkt_jitter[src][dst],
......@@ -188,7 +188,7 @@ float owd_const_application_v=owd_const_application()/2;
if (otg_info->rx_pkt_owd_history_e2e[src][dst][1] == 0) // first packet
otg_info->rx_pkt_jitter_e2e[src][dst]=0;
else // for the consecutive packets
otg_info->rx_pkt_jitter_e2e[src][dst]= abs(otg_info->rx_pkt_owd_history_e2e[src][dst][0] - otg_info->rx_pkt_owd_history_e2e[src][dst][1]);
otg_info->rx_pkt_jitter_e2e[src][dst]= fabsf(otg_info->rx_pkt_owd_history_e2e[src][dst][0] - otg_info->rx_pkt_owd_history_e2e[src][dst][1]);
LOG_D(OTG,"The packet jitter for the pair (src %d, dst %d)) at %d is %lf (current %lf, previous %lf) \n",
src, dst, ctime, otg_info->rx_pkt_jitter_e2e[src][dst],
......
......@@ -42,6 +42,7 @@
#include "UTIL/MATH/oml.h"
#include "otg_tx.h"
#include "otg_externs.h"
#include "assertions.h"
extern unsigned char NB_eNB_INST;
extern unsigned char NB_UE_INST;
......@@ -564,19 +565,22 @@ void header_size_gen_multicast(int src, int dst, int application){
char *random_string(int size, ALPHABET_GEN mode, ALPHABET_TYPE data_type) {
char *data=NULL;
int i=0,start=0;
DevAssert( size < strlen(FIXED_STRING) );
switch (mode){
case REPEAT_STRING:
start = uniform_dist (0, abs(strlen(FIXED_STRING)- size - 1));
start = uniform_dist (0, strlen(FIXED_STRING) - size - 1);
return str_sub (FIXED_STRING, start, start + size -1);
break;
case SUBSTRACT_STRING:
//data=strndup(data_string + (strlen(data_string) - size), strlen(data_string));
//data=strndup(data_string + (strlen(data_string) - size), size);
if (data_type == HEADER_ALPHABET){
start = uniform_dist (0, abs(strlen(HEADER_STRING)- size - 1));
start = uniform_dist (0, strlen(HEADER_STRING) - size - 1);
return str_sub (HEADER_STRING, start, start + size -1);
}else if (data_type == PAYLOAD_ALPHABET) {
start = uniform_dist (0, abs(strlen(PAYLOAD_STRING)- size - 1));
start = uniform_dist (0, strlen(PAYLOAD_STRING) - size - 1);
return str_sub (PAYLOAD_STRING, start, start+size - 1 );
}else
LOG_E(OTG, "unsupported alphabet data type \n");
......
......@@ -2125,7 +2125,6 @@ int main( int argc, char **argv )
#endif
PHY_VARS_UE *UE[MAX_NUM_CCs];
int UE_id = 0;
mode = normal_txrx;
memset(&openair0_cfg[0],0,sizeof(openair0_config_t)*MAX_CARDS);
......@@ -2736,6 +2735,8 @@ int main( int argc, char **argv )
#endif
#ifdef XFORMS
int UE_id;
if (do_forms==1) {
fl_initialize (&argc, argv, NULL, 0, 0);
......@@ -2949,6 +2950,8 @@ int main( int argc, char **argv )
printf( "The thread was killed. No status available.\n");
}
}
#else
UNUSED(result);
#endif // DEBUG_THREADS
#endif // RTAI
......
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