lib,rlc_am_nr: fix search start point for update of rx_next

master
Robert Falkenberg 3 years ago
parent 87a4656307
commit 1d4f10fe0d

@ -1155,8 +1155,8 @@ void rlc_am_nr_rx::handle_data_pdu(uint8_t* payload, uint32_t nof_bytes)
*/
if (rx_mod_base_nr(header.sn) == rx_mod_base_nr(st.rx_next)) {
uint32_t sn_upd = 0;
uint32_t window_top = st.rx_next + am_window_size(cfg.rx_sn_field_length);
for (sn_upd = st.rx_next; rx_mod_base_nr(sn_upd) < rx_mod_base_nr(st.rx_next_highest);
// we just completed SDU with x = RX_Next; start search from RX_Next+1
for (sn_upd = (st.rx_next + 1) % mod_nr; rx_mod_base_nr(sn_upd) < rx_mod_base_nr(st.rx_next_highest);
sn_upd = (sn_upd + 1) % mod_nr) {
if (rx_window->has_sn(sn_upd)) {
if (not(*rx_window)[sn_upd].fully_received) {

Loading…
Cancel
Save