Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1338992
| From | Andrej Krpic <ak77@tnode.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 7/8] tty: n_gsm: properly format Modem Status Command message |
| Date | 2016-02-21 22:50 +0100 |
| Message-ID | <r4K38-3NN-13@gated-at.bofh.it> (permalink) |
| References | <r4K37-3NN-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Change format of Modem Status Command (MSC) message that is sent to the one expected in the receive function gsm_control_modem and specified in 3GPP TS 27.010 version 12.0.0 Release 12, 5.4.6.3.7. Wrongly formatted MSC causes DLC to be marked as constipated. A bug appears after format of transmitted control messages is fixed and control messages start to be recognized. Signed-off-by: Andrej Krpic <ak77@tnode.com> --- drivers/tty/n_gsm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 8aa90e0..b0d9edd 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -2874,12 +2874,11 @@ static int gsmtty_modem_update(struct gsm_dlci *dlci, u8 brk) if (brk) len++; - modembits[0] = len << 1 | EA; /* Data bytes */ - modembits[1] = dlci->addr << 2 | 3; /* DLCI, EA, 1 */ - modembits[2] = gsm_encode_modem(dlci) << 1 | EA; + modembits[0] = dlci->addr << 2 | 3; /* DLCI, EA, 1 */ + modembits[1] = gsm_encode_modem(dlci) << 1 | EA; if (brk) - modembits[3] = brk << 4 | 2 | EA; /* Valid, EA */ - ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len + 1); + modembits[2] = brk << 4 | 2 | EA; /* Valid, EA */ + ctrl = gsm_control_send(dlci->gsm, CMD_MSC, modembits, len); if (ctrl == NULL) return -ENOMEM; return gsm_control_wait(dlci->gsm, ctrl); -- 2.7.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 7/8] tty: n_gsm: properly format Modem Status Command message Andrej Krpic <ak77@tnode.com> - 2016-02-21 22:50 +0100
csiph-web