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.
This commit is contained in:
Andreas Eversberg 2012-07-15 06:52:19 +02:00
parent 5e043dac8c
commit 6664a90365
1 changed files with 8 additions and 4 deletions

View File

@ -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");