From: Alexander Stein Date: Mon, 16 Dec 2013 07:54:08 +0000 (+0100) Subject: sllin: Fix checksum mode decision X-Git-Url: http://rtime.felk.cvut.cz/gitweb/linux-lin.git/commitdiff_plain/672c80832f08ab2a1d925d26afda0f5d2288a33c?hp=7b1241d0725b0f98d0494120d7fe7913c63ef91a sllin: Fix checksum mode decision 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 --- diff --git a/sllin/sllin.c b/sllin/sllin.c index e05564c..487b72a 100644 --- a/sllin/sllin.c +++ b/sllin/sllin.c @@ -1216,7 +1216,7 @@ slstate_response_wait: 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,