tbf, ...: Make the fields in the dl/ul struct member variables
There is no need for the union/struct anymore. Make the variable members
of the UL/DL class.
As a result gprs_rlc_dl_window gets a reset() method because
memset(&dir.dl, 0, sizeof(dir.dl)) doesn't work anymore in reuse_tbf().
Ticket: SYS#389
Sponsored by: On-Waves ehf
diff --git a/src/rlc.cpp b/src/rlc.cpp
index 36320dc..42b602c 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -46,6 +46,13 @@
mark_invalid(i);
}
+void gprs_rlc_dl_window::reset()
+{
+ m_v_s = 0;
+ m_v_a = 0;
+ m_v_b.reset();
+}
+
int gprs_rlc_dl_window::resend_needed()
{
for (uint16_t bsn = v_a(); bsn != v_s(); bsn = (bsn + 1) & mod_sns()) {