From 28668aac343232d6121efa405ca6ef66f6685569 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 30 Jul 2021 20:41:44 +0200 Subject: [PATCH] ue,proc_ra_nr: add temporary flag to skip RAR reception this will be removed again as soon as the eNB supports full RAR transmission. --- lib/include/srsran/interfaces/mac_interface_types.h | 2 ++ srsue/hdr/stack/rrc/rrc_nr.h | 1 + srsue/src/main.cc | 1 + srsue/src/stack/mac_nr/proc_ra_nr.cc | 6 ++++++ srsue/src/stack/rrc/rrc_nr.cc | 1 + 5 files changed, 11 insertions(+) diff --git a/lib/include/srsran/interfaces/mac_interface_types.h b/lib/include/srsran/interfaces/mac_interface_types.h index e5ec84609..9aa6eee32 100644 --- a/lib/include/srsran/interfaces/mac_interface_types.h +++ b/lib/include/srsran/interfaces/mac_interface_types.h @@ -131,6 +131,7 @@ struct rach_nr_cfg_t { uint32_t powerRampingStep; uint32_t ra_responseWindow; uint32_t ra_ContentionResolutionTimer; + bool skip_rar; rach_nr_cfg_t() { reset(); } void reset() @@ -140,6 +141,7 @@ struct rach_nr_cfg_t { powerRampingStep = 0; preambleTransMax = 0; ra_responseWindow = 0; + skip_rar = false; } }; diff --git a/srsue/hdr/stack/rrc/rrc_nr.h b/srsue/hdr/stack/rrc/rrc_nr.h index 642bdbf4f..6deec7583 100644 --- a/srsue/hdr/stack/rrc/rrc_nr.h +++ b/srsue/hdr/stack/rrc/rrc_nr.h @@ -42,6 +42,7 @@ struct rrc_nr_args_t { core_less_args_t coreless; uint32_t sim_nr_meas_pci; bool pdcp_short_sn_support; + bool skip_rar; std::string supported_bands_nr_str; std::vector supported_bands_nr; std::vector supported_bands_eutra; diff --git a/srsue/src/main.cc b/srsue/src/main.cc index 666ba2c6c..e14ea853f 100644 --- a/srsue/src/main.cc +++ b/srsue/src/main.cc @@ -132,6 +132,7 @@ static int parse_args(all_args_t* args, int argc, char* argv[]) ("rrc.mbms_service_port", bpo::value(&args->stack.rrc.mbms_service_port)->default_value(4321), "Port of the MBMS service") ("rrc.nr_measurement_pci", bpo::value(&args->stack.rrc_nr.sim_nr_meas_pci)->default_value(500), "NR PCI for the simulated NR measurement") ("rrc.nr_short_sn_support", bpo::value(&args->stack.rrc_nr.pdcp_short_sn_support)->default_value(true), "Announce PDCP short SN support") + ("rrc.skip_nr_rar", bpo::value(&args->stack.rrc_nr.skip_rar)->default_value(false), "Whether to skip RAR reception (temporary feature)") ("nas.apn", bpo::value(&args->stack.nas.apn_name)->default_value(""), "Set Access Point Name (APN) for data services") ("nas.apn_protocol", bpo::value(&args->stack.nas.apn_protocol)->default_value(""), "Set Access Point Name (APN) protocol for data services") diff --git a/srsue/src/stack/mac_nr/proc_ra_nr.cc b/srsue/src/stack/mac_nr/proc_ra_nr.cc index 694292982..91deb93d7 100644 --- a/srsue/src/stack/mac_nr/proc_ra_nr.cc +++ b/srsue/src/stack/mac_nr/proc_ra_nr.cc @@ -344,6 +344,12 @@ void proc_ra_nr::prach_sent(uint32_t tti, uint32_t s_id, uint32_t t_id, uint32_t ra_window_start = TTI_ADD(tti, 3); logger.debug("Calculated ra_window_start=%d, ra_window_length=%d", ra_window_start, ra_window_length); state = WAITING_FOR_RESPONSE_RECEPTION; + + if (rach_cfg.skip_rar) { + // temp hack for NSA eNB development + state = WAITING_FOR_COMPLETION; + ra_completion(); + } }); } diff --git a/srsue/src/stack/rrc/rrc_nr.cc b/srsue/src/stack/rrc/rrc_nr.cc index bd51814af..f73bc4dcb 100644 --- a/srsue/src/stack/rrc/rrc_nr.cc +++ b/srsue/src/stack/rrc/rrc_nr.cc @@ -870,6 +870,7 @@ bool rrc_nr::apply_ul_common_cfg(const asn1::rrc_nr::ul_cfg_common_s& ul_cfg_com if (ul_cfg_common.init_ul_bwp.rach_cfg_common_present) { if (ul_cfg_common.init_ul_bwp.rach_cfg_common.type() == setup_release_c::types_opts::setup) { rach_nr_cfg_t rach_nr_cfg = make_mac_rach_cfg(ul_cfg_common.init_ul_bwp.rach_cfg_common.setup()); + rach_nr_cfg.skip_rar = args.skip_rar; mac->set_config(rach_nr_cfg); // Make the RACH configuration for PHY