- Fixed some uninitialized structures
- Fixed compiler warnings Pre-ci test passed git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4388 818b1a75-f10b-46b9-bf7c-635c3b92a50f
This commit is contained in:
@@ -676,7 +676,7 @@ void phy_config_dedicated_ue(u8 Mod_id,u8 CH_index,
|
||||
}
|
||||
|
||||
void phy_config_cba_rnti (u8 Mod_id,u8 eNB_flag, u8 index, u16 cba_rnti, u8 cba_group_id, u8 num_active_cba_groups){
|
||||
u8 i;
|
||||
// u8 i;
|
||||
|
||||
if (eNB_flag == 0 ) {
|
||||
//LOG_D(PHY,"[UE %d] configure cba group %d with rnti %x, num active cba grp %d\n", index, index, cba_rnti, num_active_cba_groups);
|
||||
@@ -1233,7 +1233,7 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
|
||||
ue_pdcch_vars[eNB_id]->llr16 = (unsigned short *)malloc16(2*4*frame_parms->N_RB_DL*12*sizeof(unsigned short));
|
||||
ue_pdcch_vars[eNB_id]->wbar = (unsigned short *)malloc16(4*frame_parms->N_RB_DL*12*sizeof(unsigned short));
|
||||
|
||||
ue_pdcch_vars[eNB_id]->e_rx = (char *)malloc16(4*2*frame_parms->N_RB_DL*12*sizeof(unsigned char));
|
||||
ue_pdcch_vars[eNB_id]->e_rx = (s8 *)malloc16(4*2*frame_parms->N_RB_DL*12*sizeof(unsigned char));
|
||||
|
||||
// PBCH
|
||||
ue_pbch_vars[eNB_id] = (LTE_UE_PBCH *)malloc16(sizeof(LTE_UE_PBCH));
|
||||
@@ -1249,7 +1249,7 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
|
||||
ue_pbch_vars[eNB_id]->rxdataF_comp[(j<<1)+i] = (int *)malloc16(sizeof(int)*(6*12*4));
|
||||
ue_pbch_vars[eNB_id]->dl_ch_estimates_ext[(j<<1)+i] = (int *)malloc16(sizeof(int)*6*12*4);
|
||||
}
|
||||
ue_pbch_vars[eNB_id]->llr = (char *)malloc16(1920*sizeof(char));
|
||||
ue_pbch_vars[eNB_id]->llr = (s8 *)malloc16(1920*sizeof(char));
|
||||
|
||||
// ue_pbch_vars[eNB_id]->channel_output = (short *)malloc16(*sizeof(short));
|
||||
|
||||
@@ -1371,7 +1371,10 @@ int phy_init_lte_ue(PHY_VARS_UE *phy_vars_ue,
|
||||
phy_vars_ue->sinr_dB = (double*) malloc16(frame_parms->N_RB_DL*12*sizeof(double));
|
||||
}
|
||||
|
||||
phy_vars_ue->sinr_CQI_dB = (double*) malloc16(frame_parms->N_RB_DL*12*sizeof(double));
|
||||
phy_vars_ue->sinr_CQI_dB = (double*) malloc16(frame_parms->N_RB_DL*12*sizeof(double));
|
||||
#if defined(OAI_EMU)
|
||||
memset(phy_vars_ue->sinr_CQI_dB, 0, frame_parms->N_RB_DL*12*sizeof(double));
|
||||
#endif
|
||||
phy_vars_ue->init_averaging = 1;
|
||||
|
||||
phy_vars_ue->pdsch_config_dedicated->p_a = PDSCH_ConfigDedicated__p_a_dB0; //defaul value until overwritten by RRCConnectionReconfiguration
|
||||
|
||||
@@ -150,7 +150,7 @@ int lte_mbsfn_est_freq_offset(int **dl_ch_estimates,
|
||||
ch_offset = (l*(frame_parms->ofdm_symbol_size));
|
||||
|
||||
if ((l!=2) && (l!=6) && (l!=10)) {
|
||||
msg("lte_est_freq_offset: l (%d) must be 2 or 6 or 10");
|
||||
msg("lte_est_freq_offset: l (%d) must be 2 or 6 or 10", l);
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,6 +132,7 @@ LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char Mdlharq,unsigned char N_RB_UL, u8 abs
|
||||
ulsch->Mdlharq = Mdlharq;
|
||||
for (i=0;i<Mdlharq;i++) {
|
||||
ulsch->harq_processes[i] = (LTE_UL_UE_HARQ_t *)malloc16(sizeof(LTE_UL_UE_HARQ_t));
|
||||
memset(ulsch->harq_processes[i], 0, sizeof(LTE_UL_UE_HARQ_t));
|
||||
// printf("ulsch->harq_processes[%d] %p\n",i,ulsch->harq_processes[i]);
|
||||
if (ulsch->harq_processes[i]) {
|
||||
ulsch->harq_processes[i]->b = (unsigned char*)malloc16(MAX_ULSCH_PAYLOAD_BYTES/bw_scaling);
|
||||
|
||||
@@ -151,6 +151,7 @@ int write_output(const char *fname,const char *vname,void *data,int length,int d
|
||||
fclose(fp);
|
||||
return(0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // USER_MODE
|
||||
|
||||
@@ -187,7 +187,7 @@ double compute_sinr(channel_desc_t *desc,
|
||||
return(10*log10(avg_sinr/(nb_rb*2)));
|
||||
}
|
||||
|
||||
u8 pbch_polynomial_degree;
|
||||
int pbch_polynomial_degree;
|
||||
double a[7];
|
||||
|
||||
void load_pbch_desc(FILE *pbch_file_fd) {
|
||||
|
||||
@@ -8,8 +8,10 @@
|
||||
* \warning
|
||||
* @ingroup driver
|
||||
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#include "nas_config.h"
|
||||
#include "UTIL/LOG/log.h"
|
||||
@@ -57,8 +59,6 @@ void rb_ioctl_init(int inst) {
|
||||
|
||||
int rb_validate_config_ipv4(int cx, int inst, int rb) {
|
||||
|
||||
struct sockaddr_in sa;
|
||||
|
||||
if (inst == -1){
|
||||
LOG_E(OIP,"Specify an interface\n");
|
||||
return(1);
|
||||
@@ -92,8 +92,6 @@ int rb_conf_ipv4(int action,int cx, int inst, int rb, int dscp, in_addr_t saddr_
|
||||
//int rb_conf(rb_config *rb_cfg) {
|
||||
|
||||
int err;
|
||||
unsigned int mpls_outlabel,mpls_inlabel;
|
||||
char addr_str[46];
|
||||
|
||||
struct nas_msg_rb_establishment_request *msgreq;
|
||||
struct nas_msg_class_add_request *msgreq_class;
|
||||
@@ -242,10 +240,10 @@ int rb_stats_req(int inst) {
|
||||
|
||||
in_addr_t ipv4_address (int thirdOctet, int fourthOctet){
|
||||
|
||||
in_addr_t saddr_ipv4;
|
||||
struct in_addr saddr_ipv4;
|
||||
char ipAddress[20];
|
||||
sprintf(ipAddress, "10.0.%d.%d",thirdOctet,fourthOctet);
|
||||
inet_aton(ipAddress,&saddr_ipv4);
|
||||
return saddr_ipv4;
|
||||
return saddr_ipv4.s_addr;
|
||||
|
||||
}
|
||||
|
||||
@@ -173,9 +173,11 @@ void init_lte_vars(LTE_DL_FRAME_PARMS **frame_parms,
|
||||
|
||||
mac_xface = malloc(sizeof(MAC_xface));
|
||||
|
||||
memset(mac_xface, 0, sizeof(MAC_xface));
|
||||
|
||||
LOG_I(PHY,"init lte parms: Nid_cell %d, Frame type %d, N_RB_DL %d\n",Nid_cell,frame_type,N_RB_DL);
|
||||
|
||||
*frame_parms = malloc(sizeof(LTE_DL_FRAME_PARMS));
|
||||
*frame_parms = calloc(1, sizeof(LTE_DL_FRAME_PARMS));
|
||||
(*frame_parms)->frame_type = frame_type;
|
||||
(*frame_parms)->tdd_config = tdd_config;
|
||||
(*frame_parms)->tdd_config_S = tdd_config_S;
|
||||
|
||||
Reference in New Issue
Block a user