sllin: slave: don't forget to wait for the checksum
authorAlexander Stein <alexander.stein@systec-electronic.com>
Tue, 10 Dec 2013 17:16:14 +0000 (18:16 +0100)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Wed, 11 Dec 2013 09:37:11 +0000 (10:37 +0100)
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
sllin/sllin.c

index cf3cd75..b97219e 100644 (file)
@@ -550,7 +550,7 @@ static void sllin_slave_receive_buf(struct tty_struct *tty,
 
                        /* Is the length of data set in frame cache? */
                        if (sce->frame_fl & LIN_CACHE_RESPONSE) {
-                               sl->rx_expect += sce->dlc;
+                               sl->rx_expect += sce->dlc + 1; /* + checksum */
                                sl->rx_len_unknown = false;
                        } else {
                                sl->rx_expect += SLLIN_DATA_MAX + 1; /* + checksum */