From f9ff6758aa17670a27c8b4ebe379a184087d3a6c Mon Sep 17 00:00:00 2001 From: Carlo Galiotto Date: Thu, 25 Nov 2021 15:50:51 +0100 Subject: [PATCH] rrc-nr: temporary fix to handle inactivity timeout Fixes issue #3689 Signed-off-by: Carlo Galiotto --- srsgnb/hdr/stack/rrc/rrc_nr.h | 1 + srsgnb/src/stack/rrc/rrc_nr.cc | 7 +++++++ srsgnb/src/stack/rrc/rrc_nr_ue.cc | 10 ++++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/srsgnb/hdr/stack/rrc/rrc_nr.h b/srsgnb/hdr/stack/rrc/rrc_nr.h index eac2f93f8..a82e5fb16 100644 --- a/srsgnb/hdr/stack/rrc/rrc_nr.h +++ b/srsgnb/hdr/stack/rrc/rrc_nr.h @@ -73,6 +73,7 @@ public: void rem_user(uint16_t rnti); int update_user(uint16_t new_rnti, uint16_t old_rnti) final; void set_activity_user(uint16_t rnti) final; + int rrc_release(uint16_t rnti); // RLC interface // TODO diff --git a/srsgnb/src/stack/rrc/rrc_nr.cc b/srsgnb/src/stack/rrc/rrc_nr.cc index fff08d71f..fdb97a6bb 100644 --- a/srsgnb/src/stack/rrc/rrc_nr.cc +++ b/srsgnb/src/stack/rrc/rrc_nr.cc @@ -203,6 +203,13 @@ void rrc_nr::rem_user(uint16_t rnti) } } +/// This function is called when the INACTIVITY TIMER FOR +int rrc_nr::rrc_release(uint16_t rnti) +{ + // TODO: we do not have yet a defined procedure to handle this + return SRSRAN_SUCCESS; +} + /* Function called by MAC after the reception of a C-RNTI CE indicating that the UE still has a * valid RNTI. */ diff --git a/srsgnb/src/stack/rrc/rrc_nr_ue.cc b/srsgnb/src/stack/rrc/rrc_nr_ue.cc index 00a25860e..a4c15a4a2 100644 --- a/srsgnb/src/stack/rrc/rrc_nr_ue.cc +++ b/srsgnb/src/stack/rrc/rrc_nr_ue.cc @@ -92,10 +92,16 @@ void rrc_nr::ue::activity_timer_expired(const activity_timeout_type_t type) switch (type) { case MSG5_RX_TIMEOUT: - case UE_INACTIVITY_TIMEOUT: + case UE_INACTIVITY_TIMEOUT: { state = rrc_nr_state_t::RRC_INACTIVE; - parent->rrc_eutra->sgnb_inactivity_timeout(eutra_rnti); + if (parent->cfg.is_standalone) { + // TODO: This procedure needs to be defined + parent->rrc_release(rnti); + } else { + parent->rrc_eutra->sgnb_inactivity_timeout(eutra_rnti); + } break; + } case MSG3_RX_TIMEOUT: { // MSG3 timeout, no need to notify NGAP or LTE stack. Just remove UE state = rrc_nr_state_t::RRC_IDLE;