On Tue, Mar 01, 2016 at 08:33:37AM +0100, Sven Eckelmann wrote: > 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 > --- > 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 > #include_next > > -#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) Sven, does it mean that on <3.2 batman v won't compile at all ? Cheers, -- Antonio Quartulli