From 3f4cf0a91fbe6baba39195377635e2b5beb2a014 Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Tue, 2 Mar 2021 19:46:17 +0000 Subject: [PATCH] Fix setting last_submitted_rx_sn in HO --- srsenb/src/stack/rrc/rrc_mobility.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsenb/src/stack/rrc/rrc_mobility.cc b/srsenb/src/stack/rrc/rrc_mobility.cc index 18e124e4b..4b85964ad 100644 --- a/srsenb/src/stack/rrc/rrc_mobility.cc +++ b/srsenb/src/stack/rrc/rrc_mobility.cc @@ -899,7 +899,7 @@ void rrc::ue::rrc_mobility::handle_status_transfer(s1_target_ho_st& s, const sta drb_state.next_pdcp_rx_sn = erab_item.ul_coun_tvalue.pdcp_sn; uint8_t sn_len = srslte::get_pdcp_drb_sn_len(drb_it->pdcp_cfg); uint32_t maximum_pdcp_sn = (1u << sn_len) - 1u; - drb_state.last_submitted_pdcp_rx_sn = std::max(erab_item.ul_coun_tvalue.pdcp_sn - 1u, maximum_pdcp_sn); + drb_state.last_submitted_pdcp_rx_sn = std::min(erab_item.ul_coun_tvalue.pdcp_sn - 1u, maximum_pdcp_sn); logger.info("Setting lcid=%d PDCP state to {Tx SN: %d, Rx SN: %d}", drb_it->lc_ch_id, drb_state.next_pdcp_tx_sn,