tbf/rlc: Move the marking of frames for resend into the v_b
diff --git a/src/rlc.cpp b/src/rlc.cpp
index 1a05546..f6b1362 100644
--- a/src/rlc.cpp
+++ b/src/rlc.cpp
@@ -50,3 +50,21 @@
return -1;
}
+
+int gprs_rlc_v_b::mark_for_resend(const uint16_t v_a, const uint16_t v_s,
+ const uint16_t mod_sns,
+ const uint16_t mod_sns_half)
+{
+ int resend = 0;
+
+ for (uint8_t bsn = v_a; bsn != v_s; bsn = (bsn + 1) & mod_sns) {
+ uint16_t index = (bsn & mod_sns_half);
+ if (is_unacked(index)) {
+ /* mark to be re-send */
+ mark_resend(index);
+ resend += 1;
+ }
+ }
+
+ return resend;
+}