From a59884a14a18d45bef80323689f1846e6f21ecca Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Tue, 21 Apr 2020 19:40:31 +0200 Subject: [PATCH] SRSENB: configure PUCCH3 as default HARQ feedback for CA --- srsenb/src/enb_cfg_parser.cc | 29 +++++++++++++++++++---------- srsenb/src/stack/rrc/rrc.cc | 18 ++++++++++++++++++ 2 files changed, 37 insertions(+), 10 deletions(-) diff --git a/srsenb/src/enb_cfg_parser.cc b/srsenb/src/enb_cfg_parser.cc index 94dbd68c9..c9b7df072 100644 --- a/srsenb/src/enb_cfg_parser.cc +++ b/srsenb/src/enb_cfg_parser.cc @@ -699,10 +699,25 @@ static int parse_meas_report_desc(rrc_meas_cfg_t* meas_cfg, Setting& root) return SRSLTE_SUCCESS; } -static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root) +static int parse_scell_list(cell_cfg_t& cell_cfg, Setting& cellroot) { auto cell_id_parser = [](uint32_t& cell_id, Setting& root) { return parse_bounded_number(cell_id, root, 0u, 255u); }; + cell_cfg.scell_list.resize(cellroot["scell_list"].getLength()); + for (uint32_t i = 0; i < cell_cfg.scell_list.size(); ++i) { + auto& scell = cell_cfg.scell_list[i]; + auto& scellroot = cellroot["scell_list"][i]; + cell_id_parser(scell.cell_id, scellroot["cell_id"]); + scell.cross_carrier_sched = (bool)scellroot["cross_carrier_scheduling"]; + cell_id_parser(scell.sched_cell_id, scellroot["scheduling_cell_id"]); + scell.ul_allowed = (bool)scellroot["ul_allowed"]; + } + + return SRSLTE_SUCCESS; +} + +static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root) +{ rrc_cfg->cell_list.resize(root.getLength()); for (uint32_t n = 0; n < rrc_cfg->cell_list.size(); ++n) { cell_cfg_t& cell_cfg = rrc_cfg->cell_list[n]; @@ -719,19 +734,13 @@ static int parse_cell_list(all_args_t* args, rrc_cfg_t* rrc_cfg, Setting& root) cell_cfg.root_seq_idx, cellroot, "root_seq_idx", rrc_cfg->sibs[1].sib2().rr_cfg_common.prach_cfg.root_seq_idx); parse_default_field(cell_cfg.initial_dl_cqi, cellroot, "initial_dl_cqi", 5u); - if (cellroot["ho_active"]) { + if (cellroot.exists("ho_active") and cellroot["ho_active"]) { HANDLEPARSERCODE(parse_meas_cell_list(&cell_cfg.meas_cfg, cellroot["meas_cell_list"])); HANDLEPARSERCODE(parse_meas_report_desc(&cell_cfg.meas_cfg, cellroot["meas_report_desc"])); } - cell_cfg.scell_list.resize(cellroot["scell_list"].getLength()); - for (uint32_t i = 0; i < cell_cfg.scell_list.size(); ++i) { - auto& scell = cell_cfg.scell_list[i]; - auto& scellroot = cellroot["scell_list"][i]; - cell_id_parser(scell.cell_id, scellroot["cell_id"]); - scell.cross_carrier_sched = (bool)scellroot["cross_carrier_scheduling"]; - cell_id_parser(scell.sched_cell_id, scellroot["scheduling_cell_id"]); - scell.ul_allowed = (bool)scellroot["ul_allowed"]; + if (cellroot.exists("scell_list")) { + parse_scell_list(cell_cfg, cellroot); } } diff --git a/srsenb/src/stack/rrc/rrc.cc b/srsenb/src/stack/rrc/rrc.cc index f7456864e..0a3b34f64 100644 --- a/srsenb/src/stack/rrc/rrc.cc +++ b/srsenb/src/stack/rrc/rrc.cc @@ -1947,6 +1947,24 @@ void rrc::ue::fill_scell_to_addmod_list(asn1::rrc::rrc_conn_recfg_r8_ies_s* conn return; } + // Set DL HARQ Feedback mode, PUCCH3 by default + conn_reconf->rr_cfg_ded_present = true; + conn_reconf->rr_cfg_ded.phys_cfg_ded_present = true; + conn_reconf->rr_cfg_ded.phys_cfg_ded.ext = true; + conn_reconf->rr_cfg_ded.phys_cfg_ded.pucch_cfg_ded_v1020.set_present(true); + conn_reconf->rr_cfg_ded.phys_cfg_ded.pucch_cfg_ded_v1020.get()->pucch_format_r10_present = true; + auto pucch_format_r10 = conn_reconf->rr_cfg_ded.phys_cfg_ded.pucch_cfg_ded_v1020.get(); + pucch_format_r10->pucch_format_r10_present = true; + + auto& format3 = pucch_format_r10->pucch_format_r10.set_format3_r10(); + format3.n3_pucch_an_list_r13_present = true; + uint32_t k = 0; + format3.n3_pucch_an_list_r13.resize(4); + for (auto& e : format3.n3_pucch_an_list_r13) { + // TODO: Allocate from scheduler for avoiding collisions + e = 0; + } + conn_reconf->non_crit_ext_present = true; conn_reconf->non_crit_ext.non_crit_ext_present = true; conn_reconf->non_crit_ext.non_crit_ext.non_crit_ext_present = true;