From 9fb9e2d9b8a215b5fc0628780bed9026fe8ab591 Mon Sep 17 00:00:00 2001 From: Alexander Stein Date: Mon, 16 Dec 2013 08:54:09 +0100 Subject: [PATCH] sllin: dlc in cache > 0 is the expected LIN frame length A cache entry should not be set to LIN_CACHE_RESPONSE if there is nothing to reply from this node. A dlc set > 0 configures the expected length. Signed-off-by: Alexander Stein --- sllin/sllin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sllin/sllin.c b/sllin/sllin.c index 487b72a..c5e1749 100644 --- a/sllin/sllin.c +++ b/sllin/sllin.c @@ -768,7 +768,7 @@ static void sllin_slave_receive_buf(struct tty_struct *tty, sl->lin_state = SLSTATE_ID_RECEIVED; /* Is the length of data set in frame cache? */ - if (sce->frame_fl & LIN_CACHE_RESPONSE) { + if (sce->dlc > 0) { sl->rx_expect += sce->dlc + 1; /* + checksum */ sl->rx_len_unknown = false; set_bit(SLF_MSGEVENT, &sl->flags); -- 2.39.2