]> rtime.felk.cvut.cz Git - linux-lin.git/commitdiff
sllin: Fix checksum mode decision
authorAlexander Stein <alexander.stein@systec-electronic.com>
Mon, 16 Dec 2013 07:54:08 +0000 (08:54 +0100)
committerPavel Pisa <pisa@cmp.felk.cvut.cz>
Thu, 16 Jan 2014 23:51:07 +0000 (00:51 +0100)
rx_buff[SLLIN_BUFF_ID] only holds LIN ID + parity bits, but never internal
bits like LIN_CHECKSUM_EXTENDED.
Use correct value from internal cache entry.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
sllin/sllin.c

index e05564cf33598d7839ece2a71c0b68cc1a0bc803..487b72ad337d2c64a411c60710889f8c2dac63d8 100644 (file)
@@ -1216,7 +1216,7 @@ slstate_response_wait:
                                tx_bytes = lin_dlc;
 
                                mode = SLLIN_STPMSG_RESPONLY;
                                tx_bytes = lin_dlc;
 
                                mode = SLLIN_STPMSG_RESPONLY;
-                               if (sl->rx_buff[SLLIN_BUFF_ID] & LIN_CHECKSUM_EXTENDED)
+                               if (sce->frame_fl & LIN_CHECKSUM_EXTENDED)
                                        mode |= SLLIN_STPMSG_CHCKSUM_ENH;
 
                                if (sllin_setup_msg(sl, mode, lin_id & LIN_ID_MASK,
                                        mode |= SLLIN_STPMSG_CHCKSUM_ENH;
 
                                if (sllin_setup_msg(sl, mode, lin_id & LIN_ID_MASK,