aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-15 13:38:31 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-08 00:45:35 +0100
commitb4beb545f7751f598e520707a6358bd515282869 (patch)
tree0b1e0a9dc1980998b8cb1a9fc89772207b767b79 /src
parentd7630f2256f7e99240c214b5c3310cf650e393d5 (diff)
edge: Call update_window even if FINAL_ACK_INDICATION is set
The bitvec RBB is always valid, even when FINAL_ACK_INDICATION is set. This is done by the ack/nack decoder function which fake a bitmap starting with V(A) up to V(S)-1 in that case (see Decoding::handle_final_ack). Call gprs_rlcmac_dl_tbf::update_window unconditionally and only use is_final for logging and TBF state changes in gprs_rlcmac_dl_tbf::rcvd_dl_ack. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src')
-rw-r--r--src/tbf_dl.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/tbf_dl.cpp b/src/tbf_dl.cpp
index 80ea741..1827469 100644
--- a/src/tbf_dl.cpp
+++ b/src/tbf_dl.cpp
@@ -782,12 +782,6 @@ int gprs_rlcmac_dl_tbf::update_window(unsigned first_bsn,
"X=Resend-Unacked I=Invalid\n",
m_window.v_a(), show_v_b,
m_window.v_s_mod(-1));
-
- if (state_is(GPRS_RLCMAC_FINISHED) && m_window.window_empty()) {
- LOGP(DRLCMACDL, LOGL_NOTICE, "Received acknowledge of "
- "all blocks, but without final ack "
- "inidcation (don't worry)\n");
- }
return 0;
}
@@ -901,13 +895,21 @@ int gprs_rlcmac_dl_tbf::release()
int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, unsigned first_bsn,
struct bitvec *rbb)
{
+ int rc;
LOGP(DRLCMACDL, LOGL_DEBUG, "%s downlink acknowledge\n", tbf_name(this));
- if (!final_ack)
- return update_window(first_bsn, rbb);
+ rc = update_window(first_bsn, rbb);
- LOGP(DRLCMACDL, LOGL_DEBUG, "- Final ACK received.\n");
- return maybe_start_new_window();
+ if (final_ack) {
+ LOGP(DRLCMACDL, LOGL_DEBUG, "- Final ACK received.\n");
+ rc = maybe_start_new_window();
+ } else if (state_is(GPRS_RLCMAC_FINISHED) && m_window.window_empty()) {
+ LOGP(DRLCMACDL, LOGL_NOTICE, "Received acknowledge of "
+ "all blocks, but without final ack "
+ "indication (don't worry)\n");
+ }
+
+ return rc;
}
int gprs_rlcmac_dl_tbf::rcvd_dl_ack(uint8_t final_ack, uint8_t ssn, uint8_t *rbb)