From c888a206d9c02f20dd63313f1c43c5ce9ce81c81 Mon Sep 17 00:00:00 2001 From: Christian Gabriel Date: Sat, 9 Mar 2024 11:30:00 +0100 Subject: [PATCH] Save client version This allows to use old daemons with new versions of the driver which do not support newer features yet Signed-off-by: Christian Gabriel --- intrepid.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/intrepid.c b/intrepid.c index f7600d3..47d88ad 100644 --- a/intrepid.c +++ b/intrepid.c @@ -118,6 +118,7 @@ struct intrepid_netdevice { static int is_open; static int major_number; +static int client_version; static unsigned char *shared_mem; static struct class *intrepid_dev_class; static struct device *intrepid_dev; @@ -977,7 +978,8 @@ static long intrepid_dev_ioctl(struct file *fp, unsigned int cmd, unsigned long ret = KO_VERSION_INT; break; case SIOCGCLIENTVEROK: - if (VER_MAJ_FROM_INT(arg) == 3 && VER_MIN_FROM_INT(arg) == 1 && VER_PATCH_FROM_INT(arg) >= 0) + client_version = arg; + if (VER_MAJ_FROM_INT(arg) == 3 && VER_MIN_FROM_INT(arg) >= 1 && VER_PATCH_FROM_INT(arg) >= 0) ret = 0; /* ok to start */ else ret = 1;