Minor change to fix coverty issue

master
Ismael Gomez 5 years ago
parent 94667beb00
commit a3932f9bea

@ -85,7 +85,7 @@ void set_phy_cfg_t_common_pusch(phy_cfg_t* cfg, const asn1::rrc::pusch_cfg_commo
void set_phy_cfg_t_common_pucch(phy_cfg_t* cfg, const asn1::rrc::pucch_cfg_common_s& asn1_type);
void set_phy_cfg_t_common_srs(phy_cfg_t* cfg, const asn1::rrc::srs_ul_cfg_common_c& asn1_type);
void set_phy_cfg_t_common_pwr_ctrl(phy_cfg_t* cfg, const asn1::rrc::ul_pwr_ctrl_common_s& asn1_type);
void set_phy_cfg_t_scell_config(phy_cfg_t* cfg, const asn1::rrc::scell_to_add_mod_r10_s* asn1_type);
void set_phy_cfg_t_scell_config(phy_cfg_t* cfg, const asn1::rrc::scell_to_add_mod_r10_s& asn1_type);
void set_phy_cfg_t_enable_64qam(phy_cfg_t* cfg, const bool enabled);
}

@ -527,15 +527,15 @@ void set_phy_cfg_t_common_pwr_ctrl(phy_cfg_t* cfg, const asn1::rrc::ul_pwr_ctrl_
cfg->ul_cfg.power_ctrl.delta_preamble_msg3 = asn1_type.delta_preamb_msg3;
}
void set_phy_cfg_t_scell_config(phy_cfg_t* cfg, const asn1::rrc::scell_to_add_mod_r10_s* asn1_type)
void set_phy_cfg_t_scell_config(phy_cfg_t* cfg, const asn1::rrc::scell_to_add_mod_r10_s& asn1_type)
{
if (asn1_type->rr_cfg_common_scell_r10_present) {
if (asn1_type.rr_cfg_common_scell_r10_present) {
// Enable always CSI request extra bit
cfg->dl_cfg.dci.multiple_csi_request_enabled = true;
auto* rr_cfg_common_scell_r10 = &asn1_type->rr_cfg_common_scell_r10;
auto* rr_cfg_common_scell_r10 = &asn1_type.rr_cfg_common_scell_r10;
if (rr_cfg_common_scell_r10->ul_cfg_r10_present) {
auto* ul_cfg_r10 = &rr_cfg_common_scell_r10->ul_cfg_r10;
@ -569,8 +569,8 @@ void set_phy_cfg_t_scell_config(phy_cfg_t* cfg, const asn1::rrc::scell_to_add_mo
}
}
if (asn1_type->rr_cfg_ded_scell_r10_present) {
auto* rr_cfg_ded_scell_r10 = &asn1_type->rr_cfg_ded_scell_r10;
if (asn1_type.rr_cfg_ded_scell_r10_present) {
auto* rr_cfg_ded_scell_r10 = &asn1_type.rr_cfg_ded_scell_r10;
if (rr_cfg_ded_scell_r10->phys_cfg_ded_scell_r10_present) {
auto* phys_cfg_ded_scell_r10 = &rr_cfg_ded_scell_r10->phys_cfg_ded_scell_r10;
@ -609,7 +609,7 @@ void set_phy_cfg_t_scell_config(phy_cfg_t* cfg, const asn1::rrc::scell_to_add_mo
// Parse pdsch config dedicated
if (non_ul_cfg->pdsch_cfg_ded_r10_present) {
cfg->dl_cfg.pdsch.p_b = asn1_type->rr_cfg_common_scell_r10.non_ul_cfg_r10.pdsch_cfg_common_r10.p_b;
cfg->dl_cfg.pdsch.p_b = asn1_type.rr_cfg_common_scell_r10.non_ul_cfg_r10.pdsch_cfg_common_r10.p_b;
cfg->dl_cfg.pdsch.p_a = non_ul_cfg->pdsch_cfg_ded_r10.p_a.to_number();
cfg->dl_cfg.pdsch.power_scale = true;
}

@ -668,7 +668,7 @@ private:
bool apply_rr_config_dedicated(asn1::rrc::rr_cfg_ded_s* cnfg);
void apply_scell_config(asn1::rrc::rrc_conn_recfg_r8_ies_s* reconfig_r8);
void apply_phy_config_dedicated(const asn1::rrc::phys_cfg_ded_s& phy_cnfg);
void apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s* scell_config);
void apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s& scell_config);
void apply_mac_config_dedicated_default();

@ -2441,7 +2441,7 @@ void rrc::apply_phy_config_dedicated(const phys_cfg_ded_s& phy_cnfg)
}
}
void rrc::apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s* scell_config)
void rrc::apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s& scell_config)
{
srslte_cell_t scell = {};
uint32_t earfcn = 0;
@ -2455,14 +2455,14 @@ void rrc::apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s* scell_
phy->get_current_cell(&scell, &earfcn);
// Parse identification
if (scell_config->cell_identif_r10_present) {
scell.id = scell_config->cell_identif_r10.pci_r10;
earfcn = scell_config->cell_identif_r10.dl_carrier_freq_r10;
if (scell_config.cell_identif_r10_present) {
scell.id = scell_config.cell_identif_r10.pci_r10;
earfcn = scell_config.cell_identif_r10.dl_carrier_freq_r10;
}
// Parse radio resource
if (scell_config->rr_cfg_common_scell_r10_present) {
const rr_cfg_common_scell_r10_s* rr_cfg = &scell_config->rr_cfg_common_scell_r10;
if (scell_config.rr_cfg_common_scell_r10_present) {
const rr_cfg_common_scell_r10_s* rr_cfg = &scell_config.rr_cfg_common_scell_r10;
scell.frame_type = (rr_cfg->tdd_cfg_v1130.is_present()) ? SRSLTE_TDD : SRSLTE_FDD;
scell.nof_prb = rr_cfg->non_ul_cfg_r10.dl_bw_r10.to_number();
scell.nof_ports = rr_cfg->non_ul_cfg_r10.ant_info_common_r10.ant_ports_count.to_number();
@ -2474,7 +2474,7 @@ void rrc::apply_phy_scell_config(const asn1::rrc::scell_to_add_mod_r10_s* scell_
srslte::phy_cfg_t scell_phy_cfg = current_phy_cfg;
set_phy_cfg_t_scell_config(&scell_phy_cfg, scell_config);
phy->set_config(scell_phy_cfg, scell_config->s_cell_idx_r10, earfcn, &scell);
phy->set_config(scell_phy_cfg, scell_config.s_cell_idx_r10, earfcn, &scell);
}
void rrc::log_mac_config_dedicated()
@ -2596,7 +2596,7 @@ void rrc::apply_scell_config(asn1::rrc::rrc_conn_recfg_r8_ies_s* reconfig_r8)
mac->reconfiguration(scell_config->s_cell_idx_r10, true);
// Call phy reconfiguration
apply_phy_scell_config(scell_config);
apply_phy_scell_config(*scell_config);
}
}

Loading…
Cancel
Save