mirror of
https://github.com/linux-can/can-utils.git
synced 2026-08-06 06:49:53 +02:00
canfdtest: fix frame consistency check
This patch fixes the issue reported in:
https://github.com/linux-can/can-utils/commit/d7f28a0ffe36f73fe08729202f9c49ca5cac1dd4
https://github.com/linux-can/can-utils/issues/236
Reported-by: https://github.com/ronitnvidia
Fixes: d7f28a0ffe ("canfdtest: can_echo_dut(): check received frame for consistency")
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
+1
-1
@@ -215,7 +215,7 @@ static int check_frame(const struct can_frame *frame)
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 1; i < frame->can_dlc; i++) {
|
for (i = 1; i < frame->can_dlc; i++) {
|
||||||
if (frame->data[i] != frame->data[i-1]) {
|
if (frame->data[i] != (uint8_t)(frame->data[i-1] + 1)) {
|
||||||
printf("Frame inconsistent!\n");
|
printf("Frame inconsistent!\n");
|
||||||
print_frame(frame, 0);
|
print_frame(frame, 0);
|
||||||
err = -1;
|
err = -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user