aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-04-20 00:00:34 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-04-21 22:15:13 +0200
commit5548aa5b61e287598e883330ac05e5c68f8856bb (patch)
treedf5ec2485861841c1b04fe453e5472059fa02381
parent05092a4edcef975f2d6969727cf5cc120934d693 (diff)
downloadbackports-5548aa5b61e287598e883330ac05e5c68f8856bb.tar.gz
backports: patches: Avoid struct ethtool_ops.supported_coalesce_params
The supported_coalesce_params member was added to the struct ethtool_ops in upstream commit 95cddcb5cc20 ("ethtool: add infrastructure for centralized checking of coalescing parameters"). This prevents the usage in kernel < 5.7. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--patches/0096-ethtool-supported_coalesce_params.cocci9
1 files changed, 9 insertions, 0 deletions
diff --git a/patches/0096-ethtool-supported_coalesce_params.cocci b/patches/0096-ethtool-supported_coalesce_params.cocci
new file mode 100644
index 00000000..9b1b090e
--- /dev/null
+++ b/patches/0096-ethtool-supported_coalesce_params.cocci
@@ -0,0 +1,9 @@
+@r@
+identifier s,expr;
+@@
+
+struct ethtool_ops s = {
++#if LINUX_VERSION_IS_GEQ(5,7,0)
+ .supported_coalesce_params = expr,
++#endif
+};