From d99cff050dea1830f8d10803583e7d28f050e418 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 15 Jun 2022 10:50:45 +0200 Subject: [PATCH 1/3] ue,rrc_nr: handle RRC release --- srsue/src/stack/rrc_nr/rrc_nr.cc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/srsue/src/stack/rrc_nr/rrc_nr.cc b/srsue/src/stack/rrc_nr/rrc_nr.cc index 296d278b1..868ddddb0 100644 --- a/srsue/src/stack/rrc_nr/rrc_nr.cc +++ b/srsue/src/stack/rrc_nr/rrc_nr.cc @@ -949,6 +949,11 @@ void rrc_nr::rrc_release() pdcp->reset(); mac->reset(); lcid_drb.clear(); + + // Apply actions only applicable in SA mode + if (rrc_eutra == nullptr) { + stack->reset_eps_bearers(); + } } int rrc_nr::get_nr_capabilities(srsran::byte_buffer_t* nr_caps_pdu) @@ -2261,9 +2266,12 @@ void rrc_nr::handle_security_mode_command(const asn1::rrc_nr::security_mode_cmd_ pdcp->enable_encryption(lcid, DIRECTION_TXRX); } -void rrc_nr::handle_rrc_release(const asn1::rrc_nr::rrc_release_s& rrc_release) +void rrc_nr::handle_rrc_release(const asn1::rrc_nr::rrc_release_s& msg) { - logger.info("RRC Release not handled yet"); + logger.info("Received RRC Release"); + srsran::console("Received RRC Release\n"); + + rrc_release(); } // Security helper used by Security Mode Command and Mobility handling routines From f6033264f909689a5336144663d809609baa3e44 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Wed, 15 Jun 2022 16:55:17 +0200 Subject: [PATCH 2/3] gnb,mac_nr: ignore SE_PHR CE received from UE we are not handling the periodic SE_PHR yet. --- srsgnb/src/stack/mac/mac_nr.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/srsgnb/src/stack/mac/mac_nr.cc b/srsgnb/src/stack/mac/mac_nr.cc index 8423e99eb..cb3225e85 100644 --- a/srsgnb/src/stack/mac/mac_nr.cc +++ b/srsgnb/src/stack/mac/mac_nr.cc @@ -140,6 +140,9 @@ private: sched->ul_bsr(rnti, lb.lcg_id, buff_size_field_to_bytes(lb.buffer_size, srsran::LONG_BSR)); } } break; + case srsran::mac_sch_subpdu_nr::nr_lcid_sch_t::SE_PHR: + // SE_PHR not implemented + break; case srsran::mac_sch_subpdu_nr::nr_lcid_sch_t::PADDING: break; default: From a1db7fe9fe70cdd7ce353a24e723eb95dff0104c Mon Sep 17 00:00:00 2001 From: Robert Falkenberg Date: Wed, 22 Jun 2022 13:39:49 +0200 Subject: [PATCH 3/3] rlc_am_nr: fix shadowed variable --- lib/src/rlc/rlc_am_nr_packing.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/rlc/rlc_am_nr_packing.cc b/lib/src/rlc/rlc_am_nr_packing.cc index ea8617fa7..d5ca80e33 100644 --- a/lib/src/rlc/rlc_am_nr_packing.cc +++ b/lib/src/rlc/rlc_am_nr_packing.cc @@ -140,9 +140,9 @@ bool rlc_am_nr_status_pdu_t::trim(uint32_t max_packed_size) void rlc_am_nr_status_pdu_t::refresh_packed_size() { - uint32_t packed_size = rlc_am_nr_status_pdu_sizeof_header_ack_sn; + packed_size_ = rlc_am_nr_status_pdu_sizeof_header_ack_sn; for (auto nack : nacks_) { - packed_size += nack_size(nack); + packed_size_ += nack_size(nack); } }