Add support for older kernels
        Tested working properly back to 4.4
Disabled aliasing for kernels <4.15
        Required, as these kernels do not have netdevice aliasing
Use the correct format specifier for (s)size_t
        Resolves a compile-time warning on 32-bit
Check the return type of copy_from_user
        Resolves a compile-time warning on ARM
Standardize kernel version checking
Requires icsscand >= v2.0.1
        icsscand v2.0.0 will not work with older kernels, and would display an obscure error
pull/10/head v2.0.2
Paul Hollinsky 2019-08-27 18:39:21 -04:00
parent 03235819fc
commit 96836cb186
3 changed files with 27 additions and 4 deletions

21
CHANGELOG 100644
View File

@ -0,0 +1,21 @@
v2.0.2
Add support for older kernels
Tested working properly back to 4.4
Disabled aliasing for kernels <4.15
Required, as these kernels do not have netdevice aliasing
Use the correct format specifier for (s)size_t
Resolves a compile-time warning on 32-bit
Check the return type of copy_from_user
Resolves a compile-time warning on ARM
Standardize kernel version checking
Requires icsscand >= v2.0.1
icsscand v2.0.0 will not work with older kernels, and would display an obscure error
v2.0.1
Resolve runtime warning message on changing MTU
Reviewed our locking behavior, made tweaks where necessary
v2.0.0
Full rewrite
Initial release with CAN-FD support
Requires icsscand >= v2.0.0

View File

@ -1,4 +1,4 @@
Version 2.0.1 Version 2.0.2
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.

View File

@ -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 1 #define KO_PATCH 2
#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
@ -624,9 +624,11 @@ static long intrepid_dev_ioctl(struct file *fp, unsigned int cmd, unsigned long
case SIOCGCLIENTVEROK: case SIOCGCLIENTVEROK:
/* Here we can do checks to see if the usermode daemon is /* Here we can do checks to see if the usermode daemon is
* a compatible version with us. We don't enforce anything * a compatible version with us. We don't enforce anything
* on the kernel side. For now, being version 2.X.X is good. * on the kernel side. icsscand v2.0.0 will not work with
* older kernels, and would display an obscure error, thus
* we want to ask the user to update to v2.0.1 or later
*/ */
if (VER_MAJ_FROM_INT(arg) == 2) if (VER_MAJ_FROM_INT(arg) == 2 && (VER_MIN_FROM_INT(arg) > 0 || VER_PATCH_FROM_INT(arg) >= 1))
ret = 0; /* ok to start */ ret = 0; /* ok to start */
else else
ret = 1; ret = 1;