From 6ae47b651043b67378490906bd7c5bac37ee00ec Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 6 Oct 2020 18:19:13 +0200 Subject: [PATCH] SRSUE: Deafult PUCCH/SRS does not imply full PHY dedicated defaults --- .../srslte/interfaces/rrc_interface_types.h | 20 ++++++++++++------- srsue/hdr/stack/rrc/phy_controller.h | 2 +- srsue/hdr/stack/rrc/rrc.h | 1 - srsue/src/stack/rrc/phy_controller.cc | 4 ++-- srsue/src/stack/rrc/rrc.cc | 16 +++++---------- 5 files changed, 21 insertions(+), 22 deletions(-) diff --git a/lib/include/srslte/interfaces/rrc_interface_types.h b/lib/include/srslte/interfaces/rrc_interface_types.h index 528d8c7e8..2ee567f39 100644 --- a/lib/include/srslte/interfaces/rrc_interface_types.h +++ b/lib/include/srslte/interfaces/rrc_interface_types.h @@ -192,6 +192,18 @@ struct phy_cfg_t { set_defaults_dedicated(); } + // 36.331 9.2.4 for CQI-ReportConfig, soundingRS-UL-ConfigDedicated and schedulingRequestConfig + void set_defaults_pucch_sr() + { + dl_cfg.cqi_report.periodic_configured = false; + dl_cfg.cqi_report.aperiodic_configured = false; + + ul_cfg.srs.dedicated_enabled = false; + ul_cfg.srs.configured = false; + + ul_cfg.pucch.sr_configured = false; + } + // 36.331 9.2.4 void set_defaults_dedicated() { @@ -200,9 +212,6 @@ struct phy_cfg_t { dl_cfg.pdsch.use_tbs_index_alt = false; dl_cfg.pdsch.p_a = 0; - dl_cfg.cqi_report.periodic_configured = false; - dl_cfg.cqi_report.aperiodic_configured = false; - ul_cfg.pucch.tdd_ack_multiplex = false; ul_cfg.pusch.uci_offset.I_offset_ack = 10; @@ -215,10 +224,7 @@ struct phy_cfg_t { ul_cfg.power_ctrl.p0_nominal_pucch = 0; ul_cfg.power_ctrl.p_srs_offset = 7; - ul_cfg.srs.dedicated_enabled = false; - ul_cfg.srs.configured = false; - - ul_cfg.pucch.sr_configured = false; + set_defaults_pucch_sr(); } srslte_dl_cfg_t dl_cfg = {}; diff --git a/srsue/hdr/stack/rrc/phy_controller.h b/srsue/hdr/stack/rrc/phy_controller.h index 1fc54c26a..a90184d22 100644 --- a/srsue/hdr/stack/rrc/phy_controller.h +++ b/srsue/hdr/stack/rrc/phy_controller.h @@ -65,7 +65,7 @@ public: void out_sync() { trigger(out_sync_ev{}); } bool set_cell_config(const srslte::phy_cfg_t& config, uint32_t cc_idx = 0); void set_phy_to_default(); - void set_phy_to_default_dedicated(); + void set_phy_to_default_pucch_srs(); void set_config_complete(); // state getters diff --git a/srsue/hdr/stack/rrc/rrc.h b/srsue/hdr/stack/rrc/rrc.h index 6159fb213..eb47bd423 100644 --- a/srsue/hdr/stack/rrc/rrc.h +++ b/srsue/hdr/stack/rrc/rrc.h @@ -387,7 +387,6 @@ private: // Helpers for setting default values void set_phy_default_pucch_srs(); - void set_phy_config_dedicated_default(); void set_phy_default(); void set_mac_default(); void set_rrc_default(); diff --git a/srsue/src/stack/rrc/phy_controller.cc b/srsue/src/stack/rrc/phy_controller.cc index c8ccbaed6..6dcf1d0f1 100644 --- a/srsue/src/stack/rrc/phy_controller.cc +++ b/srsue/src/stack/rrc/phy_controller.cc @@ -61,12 +61,12 @@ void phy_controller::set_phy_to_default() } } -void phy_controller::set_phy_to_default_dedicated() +void phy_controller::set_phy_to_default_pucch_srs() { log_h->info("Setting default PHY config dedicated\n"); srslte::phy_cfg_t& default_cfg_ded = current_cells_cfg[0]; - default_cfg_ded.set_defaults_dedicated(); + default_cfg_ded.set_defaults_pucch_sr(); for (uint32_t i = 0; i < SRSLTE_MAX_CARRIERS; ++i) { set_cell_config_common(default_cfg_ded, i, false); } diff --git a/srsue/src/stack/rrc/rrc.cc b/srsue/src/stack/rrc/rrc.cc index 8a35059a3..40bf9aad1 100644 --- a/srsue/src/stack/rrc/rrc.cc +++ b/srsue/src/stack/rrc/rrc.cc @@ -1989,16 +1989,6 @@ void rrc::set_phy_default() } } -// Apply default physical channel configs (9.2.4) -void rrc::set_phy_config_dedicated_default() -{ - if (phy_ctrl != nullptr) { - phy_ctrl->set_phy_to_default_dedicated(); - } else { - rrc_log->info("RRC not initialized. Skipping default PHY config.\n"); - } -} - // Apply provided PHY config void rrc::apply_phy_config_dedicated(const phys_cfg_ded_s& phy_cnfg, bool is_handover) { @@ -2440,7 +2430,11 @@ void rrc::add_mrb(uint32_t lcid, uint32_t port) // PHY CONFIG DEDICATED Defaults (3GPP 36.331 v10 9.2.4) void rrc::set_phy_default_pucch_srs() { - set_phy_config_dedicated_default(); + if (phy_ctrl != nullptr) { + phy_ctrl->set_phy_to_default_pucch_srs(); + } else { + rrc_log->info("RRC not initialized. Skipping default PUCCH/SRS config.\n"); + } // SR configuration affects to MAC SR too current_mac_cfg.sr_cfg.reset();