Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

n_gsm: fix the wrong FCS handling

FCS could be GSM0_SOF, so will break state machine...

[This byte isn't quoted in any way so a SOF here doesn't imply an error
occurred.]

Signed-off-by: Alek Du <alek.du@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@kernel.org> [3.0]

[Trivial but best backported once its in 3.1rc I think]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Du, Alek and committed by
Greg Kroah-Hartman
f086ced1 bff52fd4

-4
-4
drivers/tty/n_gsm.c
··· 1871 1871 break; 1872 1872 case GSM_FCS: /* FCS follows the packet */ 1873 1873 gsm->received_fcs = c; 1874 - if (c == GSM0_SOF) { 1875 - gsm->state = GSM_SEARCH; 1876 - break; 1877 - } 1878 1874 gsm_queue(gsm); 1879 1875 gsm->state = GSM_SSOF; 1880 1876 break;