From 986e0fc273d10bbdb155bb29d229b82078bf52a6 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Wed, 2 Feb 2022 17:30:37 +0000 Subject: [PATCH] gnb,rlc_am_nr: fix generation of default AM NR configs --- lib/src/asn1/rrc_nr_utils.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/src/asn1/rrc_nr_utils.cc b/lib/src/asn1/rrc_nr_utils.cc index b82b2499b..e0e61182c 100644 --- a/lib/src/asn1/rrc_nr_utils.cc +++ b/lib/src/asn1/rrc_nr_utils.cc @@ -102,10 +102,11 @@ void make_mac_rach_cfg(const rach_cfg_common_s& asn1_type, rach_cfg_nr_t* rach_c int make_rlc_config_t(const rlc_cfg_c& asn1_type, uint8_t bearer_id, rlc_config_t* cfg_out) { - rlc_config_t rlc_cfg = rlc_config_t::default_rlc_um_nr_config(); + rlc_config_t rlc_cfg = {}; rlc_cfg.rat = srsran_rat_t::nr; switch (asn1_type.type().value) { case rlc_cfg_c::types_opts::am: + rlc_cfg = rlc_config_t::default_rlc_am_nr_config(); if (asn1_type.am().dl_am_rlc.sn_field_len_present && asn1_type.am().ul_am_rlc.sn_field_len_present && asn1_type.am().dl_am_rlc.sn_field_len != asn1_type.am().ul_am_rlc.sn_field_len) { asn1::log_warning("NR RLC sequence number length is not the same in uplink and downlink"); @@ -126,6 +127,7 @@ int make_rlc_config_t(const rlc_cfg_c& asn1_type, uint8_t bearer_id, rlc_config_ } break; case rlc_cfg_c::types_opts::um_bi_dir: + rlc_cfg = rlc_config_t::default_rlc_um_nr_config(); rlc_cfg.rlc_mode = rlc_mode_t::um; rlc_cfg.um_nr.t_reassembly_ms = asn1_type.um_bi_dir().dl_um_rlc.t_reassembly.to_number(); rlc_cfg.um_nr.bearer_id = bearer_id;