[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-can
Subject: [PATCH 11/11] sllin: Evaluate message upon break only if received at least a LIN ID
From: Alexander Stein <alexander.stein () systec-electronic ! com>
Date: 2013-12-16 7:54:14
Message-ID: 1387180454-1738-12-git-send-email-alexander.stein () systec-electronic ! com
[Download RAW message or body]
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
---
sllin/sllin.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/sllin/sllin.c b/sllin/sllin.c
index 61c8134..8d7ad69 100644
--- a/sllin/sllin.c
+++ b/sllin/sllin.c
@@ -716,10 +716,12 @@ static void sllin_slave_receive_buf(struct tty_struct *tty,
if (fp && *fp++) {
/*
* If we don't know the length of the current message
- * we received the break of the next message.
- * Evaluate the previous one before continuing
+ * and received at least the LIN ID, we received here
+ * the break of the next message.
+ * Evaluate the previous one before continuing.
*/
- if (sl->rx_len_unknown == true)
+ if ((sl->rx_len_unknown == true) &&
+ (sl->rx_cnt >= SLLIN_BUFF_ID))
{
hrtimer_cancel(&sl->rx_timer);
sllin_slave_finish_rx_msg(sl);
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-can" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic