Merge "diag: Fix for CRC check for Control byte"
diff --git a/drivers/char/diag/diagchar_hdlc.c b/drivers/char/diag/diagchar_hdlc.c
index 7b24591..3e38a3c 100644
--- a/drivers/char/diag/diagchar_hdlc.c
+++ b/drivers/char/diag/diagchar_hdlc.c
@@ -207,15 +207,11 @@
^ ESC_MASK;
}
} else if (src_byte == CONTROL_CHAR) {
- dest_ptr[len++] = src_byte;
- /*
- * If this is the first byte in the message,
- * then it is part of the command. Otherwise,
- * consider it as the last byte of the
- * message.
- */
if (msg_start && i == 0 && src_length > 1)
continue;
+ /* Byte 0x7E will be considered
+ as end of packet */
+ dest_ptr[len++] = src_byte;
i++;
pkt_bnd = 1;
break;