diff options
| -rw-r--r-- | drivers/tty/n_gsm.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 47f8cdb207f1..74273e638c0d 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
| @@ -1658,8 +1658,12 @@ static void gsm_queue(struct gsm_mux *gsm) | |||
| 1658 | 1658 | ||
| 1659 | if ((gsm->control & ~PF) == UI) | 1659 | if ((gsm->control & ~PF) == UI) |
| 1660 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); | 1660 | gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len); |
| 1661 | /* generate final CRC with received FCS */ | 1661 | if (gsm->encoding == 0){ |
| 1662 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); | 1662 | /* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only. |
| 1663 | In this case it contain the last piece of data | ||
| 1664 | required to generate final CRC */ | ||
| 1665 | gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); | ||
| 1666 | } | ||
| 1663 | if (gsm->fcs != GOOD_FCS) { | 1667 | if (gsm->fcs != GOOD_FCS) { |
| 1664 | gsm->bad_fcs++; | 1668 | gsm->bad_fcs++; |
| 1665 | if (debug & 4) | 1669 | if (debug & 4) |
