Message ID | 1456817617-5762-1-git-send-email-sven@narfation.org (mailing list archive) |
---|---|
State | Rejected, archived |
Delegated to: | Marek Lindner |
Headers |
Return-Path: <b.a.t.m.a.n-bounces@lists.open-mesh.org> X-Original-To: patchwork@open-mesh.org Delivered-To: patchwork@open-mesh.org Received: from open-mesh.org (localhost [127.0.0.1]) by open-mesh.org (Postfix) with ESMTP id C05538149F; Tue, 1 Mar 2016 08:33:43 +0100 (CET) Authentication-Results: open-mesh.org; dkim=fail reason="verification failed; unprotected key" header.d=narfation.org header.i=@narfation.org header.b=k6F3qLo+; dkim-adsp=fail (unprotected policy); dkim-atps=neutral Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=79.140.41.39; helo=v3-1039.vlinux.de; envelope-from=sven@narfation.org; receiver=b.a.t.m.a.n@lists.open-mesh.org Authentication-Results: open-mesh.org; dmarc=pass header.from=narfation.org Received: from v3-1039.vlinux.de (narfation.org [79.140.41.39]) by open-mesh.org (Postfix) with ESMTPS id C3CCA8056B for <b.a.t.m.a.n@lists.open-mesh.org>; Tue, 1 Mar 2016 08:33:41 +0100 (CET) Received: from sven-desktop.home.narfation.org (p200300C593C063FD0000000000002E16.dip0.t-ipconnect.de [IPv6:2003:c5:93c0:63fd::2e16]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id 57B37110100; Tue, 1 Mar 2016 08:33:41 +0100 (CET) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=narfation.org; s=20121; t=1456817621; bh=d3/xm6XJyUlvawFFSTlLqYlwg6Gn0PvRDM/RQo4ruUs=; h=From:To:Cc:Subject:Date:From; b=k6F3qLo+zvwr6PnLKiEEFcfTaXBpLMVEuLPC/d43HqPh9v3eHG9WoW1RNr7CQZnya RlqUGWiYszJ96pczURXc2wfjPEDRlXfeBTWoeHX2lqb7kP3n4Vb7gdCfSoiNxrZl/a YGB9aCf1j25CotywtepDf8XS/9sl9O85gH8YPCjY= From: Sven Eckelmann <sven@narfation.org> To: b.a.t.m.a.n@lists.open-mesh.org Date: Tue, 1 Mar 2016 08:33:37 +0100 Message-Id: <1456817617-5762-1-git-send-email-sven@narfation.org> X-Mailer: git-send-email 2.7.0 Subject: [B.A.T.M.A.N.] [PATCH next v2] batman-adv: Disable __ethtool_get_link_ksettings compat on < 3.2 X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n.lists.open-mesh.org> List-Unsubscribe: <https://lists.open-mesh.org/mm/options/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=unsubscribe> List-Archive: <http://lists.open-mesh.org/pipermail/b.a.t.m.a.n/> List-Post: <mailto:b.a.t.m.a.n@lists.open-mesh.org> List-Help: <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=help> List-Subscribe: <https://lists.open-mesh.org/mm/listinfo/b.a.t.m.a.n>, <mailto:b.a.t.m.a.n-request@lists.open-mesh.org?subject=subscribe> Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking <b.a.t.m.a.n@lists.open-mesh.org> Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" <b.a.t.m.a.n-bounces@lists.open-mesh.org> |
Commit Message
Sven Eckelmann
March 1, 2016, 7:33 a.m. UTC
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(-)
Comments
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 <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) Sven, does it mean that on <3.2 batman v won't compile at all ? Cheers,
On Tuesday 01 March 2016 16:07:08 Antonio Quartulli wrote:
[...]
> does it mean that on <3.2 batman v won't compile at all ?
Ehrm, it doesn't even work on < 3.15. And afaik it never compiled on < 3.2
Kind regards,
Sven
On Tuesday 01 March 2016 08:33:37 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 <sven@narfation.org> > --- > v2: > - correct version number of the supported kernel This patch rejected in favor of the compat(-include) cleanup [1]. Kind regards, Sven [1] https://patchwork.open-mesh.org/patch/15942/
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