From: Alexander Stein Date: Mon, 16 Dec 2013 07:54:14 +0000 (+0100) Subject: sllin: Evaluate message upon break only if received at least a LIN ID X-Git-Url: http://rtime.felk.cvut.cz/gitweb/linux-lin.git/commitdiff_plain/ad7ce90af771ff022bfd1d647ea8cdc35d0d503b?ds=sidebyside sllin: Evaluate message upon break only if received at least a LIN ID Signed-off-by: Alexander Stein --- 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);