From: Sven Eckelmann <sven@narfation.org>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH next v2] batman-adv: Disable __ethtool_get_link_ksettings compat on < 3.2
Date: Tue, 1 Mar 2016 08:33:37 +0100 [thread overview]
Message-ID: <1456817617-5762-1-git-send-email-sven@narfation.org> (raw)
The __ethtool_get_link_ksettings is currently used only for kernels >=
3.15. But the compat code is read by the compiler for each kernel. But
kernels up to 3.1 never had the function __ethtool_get_settings which is
used to emulate this function for kernels < 4.6. Therefore, kernels < 3.2
will fail to compile when this compatibility layer is enabled.
Fixes: 3515604d82d5 ("batman-adv: ELP - use new ethtool_link_get_ksettings API")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
---
v2:
- correct version number of the supported kernel
compat-include/linux/ethtool.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/compat-include/linux/ethtool.h b/compat-include/linux/ethtool.h
index 87f7577..2e6270e 100644
--- a/compat-include/linux/ethtool.h
+++ b/compat-include/linux/ethtool.h
@@ -24,7 +24,9 @@
#include <linux/version.h>
#include_next <linux/ethtool.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)
+/* WARNING only enabled on kernels with __ethtool_get_settings support */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0) && \
+ LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)
#define ethtool_link_ksettings batadv_ethtool_link_ksettings
--
2.7.0
next reply other threads:[~2016-03-01 7:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 7:33 Sven Eckelmann [this message]
2016-03-01 8:07 ` [B.A.T.M.A.N.] [PATCH next v2] batman-adv: Disable __ethtool_get_link_ksettings compat on < 3.2 Antonio Quartulli
2016-03-01 8:30 ` Sven Eckelmann
2016-03-20 14:02 ` Sven Eckelmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456817617-5762-1-git-send-email-sven@narfation.org \
--to=sven@narfation.org \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox