From 246e08f7a6992e282b59ac077d8c65d667cec59a Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 12 Oct 2021 10:47:33 +0100 Subject: [PATCH] Hardcoded creation of RLC AM NR in RRC. --- srsgnb/src/stack/rrc/rrc_nr.cc | 7 ++++--- srsgnb/src/stack/rrc/rrc_nr_ue.cc | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/srsgnb/src/stack/rrc/rrc_nr.cc b/srsgnb/src/stack/rrc/rrc_nr.cc index 58f4c0b5e..585bc54a8 100644 --- a/srsgnb/src/stack/rrc/rrc_nr.cc +++ b/srsgnb/src/stack/rrc/rrc_nr.cc @@ -603,9 +603,9 @@ void rrc_nr::sgnb_addition_request(uint16_t eutra_rnti, const sgnb_addition_req_ uecfg.carriers[0].cc = 0; uecfg.ue_bearers[0].direction = mac_lc_ch_cfg_t::BOTH; srsran::phy_cfg_nr_default_t::reference_cfg_t ref_args{}; - ref_args.duplex = cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_TDD - ? srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_TDD_CUSTOM_6_4 - : srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_FDD; + ref_args.duplex = cfg.cell_list[0].duplex_mode == SRSRAN_DUPLEX_MODE_TDD + ? srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_TDD_CUSTOM_6_4 + : srsran::phy_cfg_nr_default_t::reference_cfg_t::R_DUPLEX_FDD; uecfg.phy_cfg = srsran::phy_cfg_nr_default_t{ref_args}; uecfg.phy_cfg.csi = {}; // disable CSI until RA is complete @@ -665,6 +665,7 @@ srsran::unique_byte_buffer_t rrc_nr::pack_into_pdu(const T& msg) pdu->N_bytes = bref.distance_bytes(); return pdu; } + template srsran::unique_byte_buffer_t rrc_nr::pack_into_pdu(const dl_ccch_msg_s& msg); template srsran::unique_byte_buffer_t rrc_nr::pack_into_pdu(const dl_dcch_msg_s& msg); diff --git a/srsgnb/src/stack/rrc/rrc_nr_ue.cc b/srsgnb/src/stack/rrc/rrc_nr_ue.cc index e60734d4b..5d832ccb7 100644 --- a/srsgnb/src/stack/rrc/rrc_nr_ue.cc +++ b/srsgnb/src/stack/rrc/rrc_nr_ue.cc @@ -151,12 +151,27 @@ int rrc_nr::ue::pack_secondary_cell_group_rlc_cfg(asn1::rrc_nr::cell_group_cfg_s rlc_bearer.served_radio_bearer.set_drb_id(); rlc_bearer.served_radio_bearer.drb_id() = 1; rlc_bearer.rlc_cfg_present = true; + /* rlc_bearer.rlc_cfg.set_um_bi_dir(); rlc_bearer.rlc_cfg.um_bi_dir().ul_um_rlc.sn_field_len_present = true; rlc_bearer.rlc_cfg.um_bi_dir().ul_um_rlc.sn_field_len = sn_field_len_um_opts::size12; rlc_bearer.rlc_cfg.um_bi_dir().dl_um_rlc.sn_field_len_present = true; rlc_bearer.rlc_cfg.um_bi_dir().dl_um_rlc.sn_field_len = sn_field_len_um_opts::size12; rlc_bearer.rlc_cfg.um_bi_dir().dl_um_rlc.t_reassembly = t_reassembly_opts::ms50; + */ + + rlc_bearer.rlc_cfg.set_am(); + rlc_bearer.rlc_cfg.am().ul_am_rlc.sn_field_len_present = true; + rlc_bearer.rlc_cfg.am().ul_am_rlc.sn_field_len = sn_field_len_am_opts::size12; + rlc_bearer.rlc_cfg.am().dl_am_rlc.sn_field_len_present = true; + rlc_bearer.rlc_cfg.am().dl_am_rlc.sn_field_len = sn_field_len_am_opts::size12; + + rlc_bearer.rlc_cfg.am().ul_am_rlc.t_poll_retx = t_poll_retx_opts::ms500; + rlc_bearer.rlc_cfg.am().ul_am_rlc.poll_pdu = poll_pdu_opts::p8; + rlc_bearer.rlc_cfg.am().ul_am_rlc.poll_byte = poll_byte_opts::infinity; + rlc_bearer.rlc_cfg.am().ul_am_rlc.max_retx_thres = ul_am_rlc_s::max_retx_thres_opts::t8; + rlc_bearer.rlc_cfg.am().dl_am_rlc.t_reassembly = t_reassembly_opts::ms50; + rlc_bearer.rlc_cfg.am().dl_am_rlc.t_status_prohibit = t_status_prohibit_opts::ms50; // MAC logical channel config rlc_bearer.mac_lc_ch_cfg_present = true; @@ -757,12 +772,19 @@ int rrc_nr::ue::add_drb() rlc_bearer.served_radio_bearer.set_drb_id(); rlc_bearer.served_radio_bearer.drb_id() = 1; rlc_bearer.rlc_cfg_present = true; + /* rlc_bearer.rlc_cfg.set_um_bi_dir(); rlc_bearer.rlc_cfg.um_bi_dir().ul_um_rlc.sn_field_len_present = true; rlc_bearer.rlc_cfg.um_bi_dir().ul_um_rlc.sn_field_len = sn_field_len_um_opts::size12; rlc_bearer.rlc_cfg.um_bi_dir().dl_um_rlc.sn_field_len_present = true; rlc_bearer.rlc_cfg.um_bi_dir().dl_um_rlc.sn_field_len = sn_field_len_um_opts::size12; rlc_bearer.rlc_cfg.um_bi_dir().dl_um_rlc.t_reassembly = t_reassembly_opts::ms50; + */ + rlc_bearer.rlc_cfg.set_am(); + rlc_bearer.rlc_cfg.am().ul_am_rlc.sn_field_len_present = true; + rlc_bearer.rlc_cfg.am().ul_am_rlc.sn_field_len = sn_field_len_am_opts::size12; + rlc_bearer.rlc_cfg.am().dl_am_rlc.sn_field_len_present = true; + rlc_bearer.rlc_cfg.am().dl_am_rlc.sn_field_len = sn_field_len_am_opts::size12; // add RLC bearer srsran::rlc_config_t rlc_cfg;