aboutsummaryrefslogtreecommitdiffstats
path: root/src/gsm/lapd_core.c
diff options
context:
space:
mode:
authorDaniel Willmann <dwillmann@sysmocom.de>2014-03-20 19:24:48 +0100
committerDaniel Willmann <daniel@totalueberwachung.de>2014-03-26 18:11:07 +0100
commit3dc4e16786d1e5723e76ad7c70ad54134957f9e5 (patch)
treec8a9609da0fff4967574b1d7af375d58a65f4788 /src/gsm/lapd_core.c
parent09129352f99a90a784912ae3c8ff442268a35480 (diff)
gsm/lapdm: Prevent LAPD tx_queue from filling up in polling mode
If LAPDm receives an I-Frame while there already is an I-Frame in the tx_queue the code generates an additional RR (to acknowledge the received I-Frame). Instead, N(R) of the I-Frame in the tx_queue should be updated to ACK the data.
Diffstat (limited to 'src/gsm/lapd_core.c')
-rw-r--r--src/gsm/lapd_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gsm/lapd_core.c b/src/gsm/lapd_core.c
index ef1d22a7..8c5fe9c6 100644
--- a/src/gsm/lapd_core.c
+++ b/src/gsm/lapd_core.c
@@ -1607,6 +1607,12 @@ static int lapd_rx_i(struct msgb *msg, struct lapd_msg_ctx *lctx)
if (!dl->own_busy) {
/* NOTE: V(R) is already set above */
rc = lapd_send_i(lctx, __LINE__);
+
+ /* if update_pending_iframe returns 0 it updated
+ * the lapd header of an iframe in the tx queue */
+ if (rc && dl->update_pending_frames)
+ rc = dl->update_pending_frames(lctx);
+
if (rc) {
LOGP(DLLAPD, LOGL_INFO, "we are not busy and "
"have no pending data, send RR\n");