From 3dc4e16786d1e5723e76ad7c70ad54134957f9e5 Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 20 Mar 2014 19:24:48 +0100 Subject: 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. --- src/gsm/lapd_core.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/gsm/lapd_core.c') 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"); -- cgit v1.2.3