diff --git a/lib/include/srslte/interfaces/pdcp_interface_types.h b/lib/include/srslte/interfaces/pdcp_interface_types.h index 25b7b4572..e4f21a656 100644 --- a/lib/include/srslte/interfaces/pdcp_interface_types.h +++ b/lib/include/srslte/interfaces/pdcp_interface_types.h @@ -30,6 +30,7 @@ namespace srslte { // LTE and NR common config const uint8_t PDCP_SN_LEN_5 = 5; const uint8_t PDCP_SN_LEN_7 = 7; +const uint8_t PDCP_SN_LEN_15 = 15; const uint8_t PDCP_SN_LEN_12 = 12; const uint8_t PDCP_SN_LEN_18 = 18; diff --git a/lib/src/asn1/rrc_utils.cc b/lib/src/asn1/rrc_utils.cc index 04a08908f..97a283835 100644 --- a/lib/src/asn1/rrc_utils.cc +++ b/lib/src/asn1/rrc_utils.cc @@ -232,6 +232,14 @@ uint8_t get_pdcp_drb_sn_len(const pdcp_cfg_s& pdcp_cfg) sn_len = srslte::PDCP_SN_LEN_7; } } + if (pdcp_cfg.ext) { + if (pdcp_cfg.pdcp_sn_size_v1130_present) { + sn_len = srslte::PDCP_SN_LEN_15; + } + if (pdcp_cfg.pdcp_sn_size_v1310_present) { + sn_len = srslte::PDCP_SN_LEN_18; + } + } return sn_len; } diff --git a/lib/src/upper/pdcp_entity_lte.cc b/lib/src/upper/pdcp_entity_lte.cc index 474bd1b94..e6099c501 100644 --- a/lib/src/upper/pdcp_entity_lte.cc +++ b/lib/src/upper/pdcp_entity_lte.cc @@ -84,7 +84,7 @@ void pdcp_entity_lte::reestablish() } else { // Send status report if required on reestablishment in RLC AM send_status_report(); - // Re-transmit unacknwoledged SDUs + // Re-transmit unacknowledged SDUs std::map undelivered_sdus = std::move(undelivered_sdus_queue); undelivered_sdus_queue.clear(); for (std::map::iterator it = undelivered_sdus.begin(); it != undelivered_sdus.end(); @@ -126,7 +126,7 @@ void pdcp_entity_lte::write_sdu(unique_byte_buffer_t sdu, int upper_sn) // PDUs will be removed from the queue, either when the lower layers will report // a succesfull transmission or when the discard timer expires. // Status report will also use this queue, to know the First Missing SDU (FMS). - if (is_drb() && !rlc->rb_is_um(lcid)) { + if (!rlc->rb_is_um(lcid)) { store_sdu(used_sn, sdu); }