diff options
author | Du, Alek <alek.du@intel.com> | 2011-07-07 10:16:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-07-08 18:09:22 -0400 |
commit | f086ced17191fa0c5712539d2b680eae3dc972a1 (patch) | |
tree | 5c306da57b0fc30aea3daee63fb38ab883326688 | |
parent | bff52fd458a1bca06266449b0ab8a43e9a50d240 (diff) |
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>
-rw-r--r-- | drivers/tty/n_gsm.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index a38114b01fea..14522ee8a91f 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c | |||
@@ -1871,10 +1871,6 @@ static void gsm0_receive(struct gsm_mux *gsm, unsigned char c) | |||
1871 | break; | 1871 | break; |
1872 | case GSM_FCS: /* FCS follows the packet */ | 1872 | case GSM_FCS: /* FCS follows the packet */ |
1873 | gsm->received_fcs = c; | 1873 | gsm->received_fcs = c; |
1874 | if (c == GSM0_SOF) { | ||
1875 | gsm->state = GSM_SEARCH; | ||
1876 | break; | ||
1877 | } | ||
1878 | gsm_queue(gsm); | 1874 | gsm_queue(gsm); |
1879 | gsm->state = GSM_SSOF; | 1875 | gsm->state = GSM_SSOF; |
1880 | break; | 1876 | break; |