diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-10-23 20:47:26 +0200 |
---|---|---|
committer | root <root@laptop.jolly.ten> | 2010-10-24 12:14:47 +0000 |
commit | ece1463f6f4041509a1c8fda827db3b14acc47c1 (patch) | |
tree | b85b020cfe030329d117a20cc0a54bb3cef5b629 | |
parent | ff37a753e3eb78c5c969fa02b181d1256c2bbaeb (diff) |
layer23/lapdm: Properly handle S frame with F=1 when in timer recovery
This is the signal to exit recovery mode !
See GSM 04.06 Section 5.5.7
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | src/host/layer23/src/common/lapdm.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/host/layer23/src/common/lapdm.c b/src/host/layer23/src/common/lapdm.c index b1c0d404..f3eed52d 100644 --- a/src/host/layer23/src/common/lapdm.c +++ b/src/host/layer23/src/common/lapdm.c @@ -1078,11 +1078,17 @@ static int lapdm_rx_s(struct msgb *msg, struct lapdm_msg_ctx *mctx) rsl_rll_error(RLL_CAUSE_SFRM_INC_PARAM, mctx); return -EIO; } - /* 5.4.2.2: Inidcate error on supervisory reponse F=1 */ + if (LAPDm_ADDR_CR(mctx->addr) == CR_BS2MS_RESP && LAPDm_CTRL_PF_BIT(mctx->ctrl)) { - LOGP(DLAPDM, LOGL_NOTICE, "S frame response with F=1 error\n"); - rsl_rll_error(RLL_CAUSE_UNSOL_SPRV_RESP, mctx); + if (dl->state != LAPDm_STATE_TIMER_RECOV) { + /* 5.4.2.2: Inidcate error on supervisory reponse F=1 */ + LOGP(DLAPDM, LOGL_NOTICE, "S frame response with F=1 error\n"); + rsl_rll_error(RLL_CAUSE_UNSOL_SPRV_RESP, mctx); + } else { + /* 5.5.7: Exit Timer Recovery */ + lapdm_dl_newstate(dl, LAPDm_STATE_MF_EST); + } } switch (dl->state) { |