Fixed hdr_len_bytes in PDCP NR. Tx seems OK now.

master
Pedro Alvarez 6 years ago committed by Andre Puschmann
parent 73e30743d1
commit a42726f836

@ -64,8 +64,6 @@ private:
srsue::rrc_interface_pdcp* rrc = nullptr;
srsue::gw_interface_pdcp* gw = nullptr;
uint16_t sn_len_bytes = 0;
// State variables: 3GPP TS 38.323 v15.2.0, section 7.1
uint32_t tx_next = 0; // COUNT value of next SDU to be transmitted.
uint32_t rx_next = 0; // COUNT value of next SDU expected to be received.

@ -103,7 +103,7 @@ void pdcp_entity_nr::write_pdu(unique_byte_buffer_t pdu)
(do_encryption) ? "true" : "false");
// Sanity check
if (pdu->N_bytes <= sn_len_bytes) {
if (pdu->N_bytes <= cfg.hdr_len_bytes) {
return;
}
@ -173,12 +173,12 @@ uint32_t pdcp_entity_nr::get_rcvd_sn(const unique_byte_buffer_t& pdu)
void pdcp_entity_nr::write_data_header(const srslte::unique_byte_buffer_t& sdu, uint32_t count)
{
// Check enough space for header
if (sn_len_bytes > sdu->get_headroom()) {
if (cfg.hdr_len_bytes > sdu->get_headroom()) {
log->error("Not enough space to add header\n");
return;
}
sdu->msg -= sn_len_bytes;
sdu->N_bytes += sn_len_bytes;
sdu->msg -= cfg.hdr_len_bytes;
sdu->N_bytes += cfg.hdr_len_bytes;
switch (cfg.sn_len) {
case PDCP_SN_LEN_12:

Loading…
Cancel
Save