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>
pull/424/head
Oliver Hartkopp 2023-05-09 14:30:16 +02:00
parent 5f764e73bf
commit a3b60a70fe
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}