From d87b7b419b7983f4f6b862bae4d1a1f09a060b98 Mon Sep 17 00:00:00 2001 From: George Shakula Date: Mon, 23 Sep 2024 14:08:05 +0300 Subject: [PATCH] Handle real CAN devices in the Linux driver --- drivers/linux/linux.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/linux/linux.c b/drivers/linux/linux.c index 102bde1..520e66f 100644 --- a/drivers/linux/linux.c +++ b/drivers/linux/linux.c @@ -19,7 +19,8 @@ int16_t LinuxCANInit(LinuxCANInstance* out_ins, const char* can_iface_name) { out_ins->socketcan = NULL; out_ins->mcast = NULL; - if (strncmp(can_iface_name, "vcan", 4) == 0) { + if (strncmp(can_iface_name, "vcan", 4) == 0 || + strncmp(can_iface_name, "can", 3) == 0) { out_ins->socketcan = (SocketCANInstance *)calloc(1, sizeof(SocketCANInstance)); if (out_ins->socketcan == NULL) { return -ENOMEM;