aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2012-07-15 06:52:19 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2012-07-15 06:52:19 +0200
commit6664a903652aac7284d22e072a4b64210b6f7d6e (patch)
tree651552ef59c47038affe7272cbdcc2dfb7e3c6a4
parent5e043dac8c961995f6bd94b6c0206063efea63ec (diff)
Downlink transfer is finished if all packets are acknowleged
It turned out that the final ack flag may not be set, but all packets have been acknowledged. This patch will finish transfer in case all blocks are acknowledged.
-rw-r--r--src/gprs_rlcmac_data.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/gprs_rlcmac_data.cpp b/src/gprs_rlcmac_data.cpp
index c95f41cf..9b3a0953 100644
--- a/src/gprs_rlcmac_data.cpp
+++ b/src/gprs_rlcmac_data.cpp
@@ -917,9 +917,8 @@ do_resend:
* indication from MS. This should never happen if MS works
* correctly. */
if (tbf->dir.dl.v_s == tbf->dir.dl.v_a) {
- LOGP(DRLCMACDL, LOGL_ERROR, "- MS acked all block "
- "(including final block), but did not include "
- "FINAL_ACK_INDICATION!\n");
+ LOGP(DRLCMACDL, LOGL_ERROR, "- MS acked all block, "
+ "but we still transmitting!\n");
/* we just send final block again */
index = ((tbf->dir.dl.v_s - 1) & mod_sns_half);
goto tx_block;
@@ -1251,7 +1250,12 @@ int gprs_rlcmac_downlink_ack(struct gprs_rlcmac_tbf *tbf, uint8_t final,
"X=Resend-Unacked\n", tbf->dir.dl.v_a, show_v_b,
(tbf->dir.dl.v_s - 1) & mod_sns);
- return 0;
+ if (tbf->state == GPRS_RLCMAC_FINISHED
+ && tbf->dir.dl.v_s == tbf->dir.dl.v_a) {
+ LOGP(DRLCMACDL, LOGL_NOTICE, "Received final block, "
+ "bit without final ack inidcation\n");
+ } else
+ return 0;
}
LOGP(DRLCMACDL, LOGL_DEBUG, "- Final ACK received.\n");