mirror of
https://github.com/intrepidcs/intrepid-socketcan-kernel-module.git
synced 2026-09-21 16:38:39 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a21b53cd1 | ||
|
|
9da27da69e | ||
|
|
6bbcf1b527 | ||
|
|
668e50d08c |
@@ -1,3 +1,8 @@
|
|||||||
|
v2.0.5
|
||||||
|
Add support for kernels 5.9+
|
||||||
|
Tested on 5.11.0-rc5
|
||||||
|
CAN frames with length > 8 from userspace are rejected rather than truncated
|
||||||
|
|
||||||
v2.0.4
|
v2.0.4
|
||||||
Ensure carrier is up on new kernels which require it
|
Ensure carrier is up on new kernels which require it
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
Version 2.0.4
|
Version 2.0.5
|
||||||
|
|
||||||
This is the kernel object portion of the Intrepid Control Systems SocketCAN support. For SocketCAN to work with Intrepid devices you will need to have this kernel object loaded on your system. Once the module is built and loaded run [icsscand](https://github.com/intrepidcs/icsscand) to turn on SocketCAN support.
|
This is the kernel object portion of the Intrepid Control Systems SocketCAN support. For SocketCAN to work with Intrepid devices you will need to have this kernel object loaded on your system. Once the module is built and loaded run [icsscand](https://github.com/intrepidcs/icsscand) to turn on SocketCAN support.
|
||||||
|
|
||||||
First, install the necessary dependencies for building kernel modules.
|
First, install the necessary dependencies for building kernel modules.
|
||||||
|
|
||||||
On Ubuntu, this is acomplished by running `sudo apt install linux-headers-generic build-essential gcc git`
|
On Ubuntu, this is accomplished by running `sudo apt install linux-headers-generic build-essential gcc git`
|
||||||
|
|
||||||
Clone this repository by running `git clone https://github.com/intrepidcs/intrepid-socketcan-kernel-module.git`
|
Clone this repository by running `git clone https://github.com/intrepidcs/intrepid-socketcan-kernel-module.git`
|
||||||
|
|
||||||
|
|||||||
+6
-3
@@ -57,7 +57,7 @@
|
|||||||
#define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices"
|
#define KO_DESC "Netdevice driver for Intrepid CAN/Ethernet devices"
|
||||||
#define KO_MAJOR 2
|
#define KO_MAJOR 2
|
||||||
#define KO_MINOR 0
|
#define KO_MINOR 0
|
||||||
#define KO_PATCH 4
|
#define KO_PATCH 5
|
||||||
#define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH)
|
#define KO_VERSION str(KO_MAJOR) "." str(KO_MINOR) "." str(KO_PATCH)
|
||||||
#define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH
|
#define KO_VERSION_INT (KO_MAJOR << 16) | (KO_MINOR << 8) | KO_PATCH
|
||||||
|
|
||||||
@@ -471,7 +471,10 @@ static int intrepid_fill_can_frame_from_neomessage(
|
|||||||
if (msg->status.remoteFrame)
|
if (msg->status.remoteFrame)
|
||||||
cf->can_id |= CAN_RTR_FLAG;
|
cf->can_id |= CAN_RTR_FLAG;
|
||||||
|
|
||||||
cf->can_dlc = get_can_dlc(msg->length);
|
if (unlikely(msg->length > 8))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
cf->can_dlc = msg->length;
|
||||||
memcpy(cf->data, data, cf->can_dlc);
|
memcpy(cf->data, data, cf->can_dlc);
|
||||||
|
|
||||||
stats->rx_bytes += cf->can_dlc;
|
stats->rx_bytes += cf->can_dlc;
|
||||||
@@ -835,7 +838,7 @@ exit:
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
free_net_devices:
|
free_net_devices:
|
||||||
kzfree(net_devices);
|
kfree(net_devices);
|
||||||
free_shared_mem:
|
free_shared_mem:
|
||||||
vfree(shared_mem);
|
vfree(shared_mem);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user