summaryrefslogtreecommitdiffstats
path: root/src/shared/libosmocore
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2012-01-10 13:00:04 +0100
committerSylvain Munaut <tnt@246tNt.com>2012-01-10 13:00:04 +0100
commit4dbbab5e503e4da7fe29e0e723e42c04f090537a (patch)
tree89d7339f6c7949de91078372435fe74b2217f8b6 /src/shared/libosmocore
parent506a3443ba52edf988fe2a0a54861738b777756e (diff)
Revert "libosmocore/lapd: Fixed handling of sequence errors at lapd_core.c"
This reverts commit 506a3443ba52edf988fe2a0a54861738b777756e.
Diffstat (limited to 'src/shared/libosmocore')
-rw-r--r--src/shared/libosmocore/src/gsm/lapd_core.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/shared/libosmocore/src/gsm/lapd_core.c b/src/shared/libosmocore/src/gsm/lapd_core.c
index aaaa28a7..54adbcaa 100644
--- a/src/shared/libosmocore/src/gsm/lapd_core.c
+++ b/src/shared/libosmocore/src/gsm/lapd_core.c
@@ -1497,32 +1497,14 @@ static int lapd_rx_i(struct msgb *msg, struct lapd_msg_ctx *lctx)
"V(R)=%u\n", ns, dl->v_recv);
/* discard data */
msgb_free(msg);
- if (dl->seq_err_cond != 1) {
+ if (!dl->seq_err_cond) {
/* FIXME: help me understand what exactly todo here
- */
dl->seq_err_cond = 1;
+ */
lapd_send_rej(lctx, lctx->p_f);
} else {
- /* If there are two subsequent sequence errors received,
- * ignore it. (Ignore every second subsequent error.)
- * This happens if our reply with the REJ is too slow,
- * so the remote gets a T200 timeout and sends another
- * frame with a sequence error.
- * Test showed that replying with two subsequent REJ
- * messages could the remote L2 process to abort.
- * Replying too slow shouldn't happen, but may happen
- * over serial link between BB and LAPD.
- */
- dl->seq_err_cond = 2;
}
- /* Even if N(s) sequence error, acknowledge to N(R)-1 */
- /* 5.5.3.1: Acknowlege all transmitted frames up the N(R)-1 */
- lapd_acknowledge(lctx); /* V(A) is also set here */
-
- /* Send message, if possible due to acknowledged data */
- lapd_send_i(lctx, __LINE__);
-
- return 0;
+ return -EIO;
}
dl->seq_err_cond = 0;