From: Mikhail Kshevetskiy Date: Sun, 27 Mar 2011 00:05:00 +0000 (+0400) Subject: tty/n_gsm: fix bug in CRC calculation for gsm1 mode X-Git-Tag: v2.6.39-rc5~19^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9db4e4381a8e881ff65a5d3400bfa471f84217e7;p=pandora-kernel.git tty/n_gsm: fix bug in CRC calculation for gsm1 mode Problem description: gsm_queue() calculate a CRC for arrived frames. As a last step of CRC calculation it call gsm->fcs = gsm_fcs_add(gsm->fcs, gsm->received_fcs); This work perfectly for the case of GSM0 mode as gsm->received_fcs contain the last piece of data required to generate final CRC. gsm->received_fcs is not used for GSM1 mode. Thus we put an additional byte to CRC calculation. As result we get a wrong CRC and reject incoming frame. Signed-off-by: Mikhail Kshevetskiy Acked-by: Alan Cox Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed