Commit bb4131b3 authored by Bilel's avatar Bilel

RLC AM add fixes

parent 3c7c61a4
......@@ -1233,6 +1233,10 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
{
// TO DO : RLC Notification to RRC + ReEstablishment procedure
tx_data_pdu_management->flags.max_retransmit = 1;
LOG_W(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RLC AM MAX RETX=%d] SN %04d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
tx_data_pdu_management->retx_count_next,
sn);
}
}
else if (rlc_pP->nb_bytes_requested_by_mac >= 5)
......@@ -1273,6 +1277,10 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
{
// TO DO : RLC Notification to RRC + ReEstablishment procedure
tx_data_pdu_management->flags.max_retransmit = 1;
LOG_W(RLC, PROTOCOL_RLC_AM_CTXT_FMT"[RLC AM MAX RETX=%d] SN %04d\n",
PROTOCOL_RLC_AM_CTXT_ARGS(ctxt_pP,rlc_pP),
tx_data_pdu_management->retx_count_next,
sn);
}
}
......
......@@ -261,7 +261,7 @@ mem_block_t * create_new_segment_from_pdu(
RLC_AM_PDU_SET_E(*pdu_segment_header_p);
}
/* SN */
(*pdu_segment_header_p) |= (pdu_new_segment_info_p->sn >> 8) ;
(*pdu_segment_header_p) |= ((pdu_new_segment_info_p->sn >> 8) & 0x3);
*(pdu_segment_header_p + 1) = (pdu_new_segment_info_p->sn & 0xFF);
pdu_segment_header_p += 2;
......@@ -272,7 +272,7 @@ mem_block_t * create_new_segment_from_pdu(
RLC_AM_PDU_SET_LSF(*pdu_segment_header_p);
}
/* Store SO bytes */
* (pdu_segment_header_p ) = (pdu_new_segment_info_p->so >> 8) & 0xFF;
* (pdu_segment_header_p ) |= ((pdu_new_segment_info_p->so >> 8) & 0x7F);
* (pdu_segment_header_p + 1) = pdu_new_segment_info_p->so & 0xFF;
if (num_li) {
......
......@@ -378,7 +378,10 @@ rlc_am_receive_process_control_pdu(
break;
}
}
sn_cursor = (sn_cursor + 1) & RLC_AM_SN_MASK;
if (prev_nack_sn != nack_sn) {
/* do not increment sn_cursor in case of several informations for the same nack_sn */
sn_cursor = (sn_cursor + 1) & RLC_AM_SN_MASK;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment