From a3b60a70fed3c51910f4ea33bbbadd786d285d64 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Tue, 9 May 2023 14:30:16 +0200 Subject: [PATCH] cangen: update CAN FD check to cope with CAN XL interfaces The check for CAN FD capable interfaces only checked for CANFD_MTU to enable the generation of CAN FD frame content. As CAN XL capable CAN interfaces are able to handle CAN FD frames too the check has to be extended for CANXL_MTU interfaces. Signed-off-by: Oliver Hartkopp --- cangen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cangen.c b/cangen.c index c51f24f..5f4a4fc 100644 --- a/cangen.c +++ b/cangen.c @@ -680,8 +680,8 @@ int main(int argc, char **argv) return 1; } - if (ifr.ifr_mtu != CANFD_MTU) { - printf("CAN interface is not CAN FD capable - sorry.\n"); + if (ifr.ifr_mtu != CANFD_MTU && ifr.ifr_mtu != CANXL_MTU) { + printf("CAN interface is only Classical CAN capable - sorry.\n"); return 1; }