From patchwork Tue Mar 1 07:33:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 15881 X-Patchwork-Delegate: mareklindner@neomailbox.ch Return-Path: 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 ; 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking Errors-To: b.a.t.m.a.n-bounces@lists.open-mesh.org Sender: "B.A.T.M.A.N" 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) #define ethtool_link_ksettings batadv_ethtool_link_ksettings