canfdtest: fix frame consistency check
This patch fixes the issue reported in:pull/237/headd7f28a0ffehttps://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>
parent
58dc257e11
commit
c43a168c68
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue