ue,proc_ra_nr: fix retransmission of PRACH after failed RAR rx

if the backoff value is calculated to be zero, don't start
a timer but tx new preamble directly
master
Andre Puschmann 3 years ago committed by Xavier Arteaga
parent ffc63ea270
commit d78cbdf9bb

@ -291,15 +291,20 @@ void proc_ra_nr::ra_error()
reset();
}
} else {
// if the Random Access procedure is not completed
// try again, if RA failed
if (preamble_backoff) {
backoff_wait = rand() % preamble_backoff;
} else {
backoff_wait = 0;
}
logger.warning("Backoff wait interval %d", backoff_wait);
logger.debug("Backoff wait interval %d", backoff_wait);
if (backoff_wait > 0) {
backoff_timer.set(backoff_wait, [this](uint32_t tid) { timer_expired(tid); });
backoff_timer.run();
} else {
timer_expired(backoff_timer.id());
}
}
}

Loading…
Cancel
Save