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 <socketcan@hartkopp.net>
This commit is contained in:
Oliver Hartkopp
2023-05-09 14:30:16 +02:00
parent 5f764e73bf
commit a3b60a70fe
+2 -2
View File
@@ -680,8 +680,8 @@ int main(int argc, char **argv)
return 1; return 1;
} }
if (ifr.ifr_mtu != CANFD_MTU) { if (ifr.ifr_mtu != CANFD_MTU && ifr.ifr_mtu != CANXL_MTU) {
printf("CAN interface is not CAN FD capable - sorry.\n"); printf("CAN interface is only Classical CAN capable - sorry.\n");
return 1; return 1;
} }