|
@@ -1658,8 +1658,12 @@ static void gsm_queue(struct gsm_mux *gsm)
|
|
|
|
|
|
if ((gsm->control & ~PF) == UI)
|
|
|
gsm->fcs = gsm_fcs_add_block(gsm->fcs, gsm->buf, gsm->len);
|
|
|
- /* generate final CRC with received FCS */
|
|
|
- gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs);
|
|
|
+ if (gsm->encoding == 0){
|
|
|
+ /* WARNING: gsm->received_fcs is used for gsm->encoding = 0 only.
|
|
|
+ In this case it contain the last piece of data
|
|
|
+ required to generate final CRC */
|
|
|
+ gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs);
|
|
|
+ }
|
|
|
if (gsm->fcs != GOOD_FCS) {
|
|
|
gsm->bad_fcs++;
|
|
|
if (debug & 4)
|