Commit bb4131b3 authored by hbilel's avatar hbilel

RLC AM add fixes

parent 3c7c61a4
...@@ -1233,6 +1233,10 @@ mem_block_t * rlc_am_get_pdu_to_retransmit( ...@@ -1233,6 +1233,10 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
{ {
// TO DO : RLC Notification to RRC + ReEstablishment procedure // TO DO : RLC Notification to RRC + ReEstablishment procedure
tx_data_pdu_management->flags.max_retransmit = 1; 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) else if (rlc_pP->nb_bytes_requested_by_mac >= 5)
...@@ -1273,6 +1277,10 @@ mem_block_t * rlc_am_get_pdu_to_retransmit( ...@@ -1273,6 +1277,10 @@ mem_block_t * rlc_am_get_pdu_to_retransmit(
{ {
// TO DO : RLC Notification to RRC + ReEstablishment procedure // TO DO : RLC Notification to RRC + ReEstablishment procedure
tx_data_pdu_management->flags.max_retransmit = 1; 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( ...@@ -261,7 +261,7 @@ mem_block_t * create_new_segment_from_pdu(
RLC_AM_PDU_SET_E(*pdu_segment_header_p); RLC_AM_PDU_SET_E(*pdu_segment_header_p);
} }
/* SN */ /* 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 + 1) = (pdu_new_segment_info_p->sn & 0xFF);
pdu_segment_header_p += 2; pdu_segment_header_p += 2;
...@@ -272,7 +272,7 @@ mem_block_t * create_new_segment_from_pdu( ...@@ -272,7 +272,7 @@ mem_block_t * create_new_segment_from_pdu(
RLC_AM_PDU_SET_LSF(*pdu_segment_header_p); RLC_AM_PDU_SET_LSF(*pdu_segment_header_p);
} }
/* Store SO bytes */ /* 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; * (pdu_segment_header_p + 1) = pdu_new_segment_info_p->so & 0xFF;
if (num_li) { if (num_li) {
......
...@@ -378,9 +378,12 @@ rlc_am_receive_process_control_pdu( ...@@ -378,9 +378,12 @@ rlc_am_receive_process_control_pdu(
break; break;
} }
} }
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; sn_cursor = (sn_cursor + 1) & RLC_AM_SN_MASK;
} }
} }
}
} else { } else {
......
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