From patchwork Thu Dec 31 00:10:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Blumenstingl X-Patchwork-Id: 561827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 09077140C1E for ; Thu, 31 Dec 2015 11:14:12 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=googlemail.com header.i=@googlemail.com header.b=hC7iaKcf; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 51E9E28BF63; Thu, 31 Dec 2015 01:11:27 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6FBA028BEBF for ; Thu, 31 Dec 2015 01:10:52 +0100 (CET) X-policyd-weight: using cached result; rate: -8.5 Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Thu, 31 Dec 2015 01:10:51 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id l65so73355721wmf.1 for ; Wed, 30 Dec 2015 16:11:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=awLGuDwy1hGa9pJTadr6nbZrM7odpcd2Dm2aYnXbVqM=; b=hC7iaKcfZtbgA8/4Ib1eDFc/mSPMBzFCJFUSaGmvY4lw6M2g+WMUCuZhT2gPU4CJ4n DjKZmEPPnWx2vL3d0t7NRy0F+B1ATF13jRSDsIC54xg6d1bRGEYpuUw+0wRlebGdCRiF JMzyHtrBAZLeJW5qPbI/FdBNY+ACkHeYGUxLIUdDQrrLAv5Tx5UtVYqjuG1kFZVwrjpF oz7BpJqtkSSVlSBEKjuioiguTnoBKwQvEcPbS5ep+hp9As8p31Gc98rKuf0Pdhs4JluY 4MPZqCKnWQlR1vCRK/8eVrEQ638VkuNX9HdQCE5F+02wP1QX4wyfKYdTpbz+ZFvqAv/g t41Q== X-Received: by 10.194.61.207 with SMTP id s15mr23878424wjr.83.1451520675976; Wed, 30 Dec 2015 16:11:15 -0800 (PST) Received: from blackbox.darklights.net (p200300625F24C6041100371AB927D170.dip0.t-ipconnect.de. [2003:62:5f24:c604:1100:371a:b927:d170]) by smtp.googlemail.com with ESMTPSA id ql10sm67462141wjc.23.2015.12.30.16.11.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Dec 2015 16:11:15 -0800 (PST) From: Martin Blumenstingl To: openwrt-devel@lists.openwrt.org Date: Thu, 31 Dec 2015 01:10:48 +0100 Message-Id: <1451520648-5668-4-git-send-email-martin.blumenstingl@googlemail.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1451520648-5668-1-git-send-email-martin.blumenstingl@googlemail.com> References: <1451520648-5668-1-git-send-email-martin.blumenstingl@googlemail.com> Cc: hauke@hauke-m.de Subject: [OpenWrt-Devel] [PATCH 4/4] lantiq: lantiq-deu: Make the DEU driver compatible with 4.2 and newer X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Upstream linux 4.2 commit 84be456f883c4685680fba8e5154b5f72e92957e "remove " moves scatterlist.h to linux/ instead of asm/. Upstream linux 4.3 commit b0d955ba4688fcba8112884931aea1f1e6f50f03 "crypto: aead - Remove old AEAD interfaces" removed aead_request_set_assoc. aead_request_set_ad should be used instead. --- package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h | 6 ++++++ package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h | 6 ++++++ package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h | 7 +++++++ package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h | 6 ++++++ package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c | 7 +++++++ package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c | 7 +++++++ package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c | 10 ++++++++++ 7 files changed, 49 insertions(+) diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h index 1d84da3..f030d62 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_ar9.h @@ -54,7 +54,13 @@ #include #include #include + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) +#include +#else #include +#endif + #include #include #include "ifxmips_deu.h" diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h index 62ad96d..32e055c 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_danube.h @@ -53,7 +53,13 @@ #include #include #include + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) +#include +#else #include +#endif + #include #include #include "ifxmips_deu.h" diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h index 5198a4a..c376266 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_dma.h @@ -31,11 +31,18 @@ #ifndef IFXMIPS_DEU_DMA_H #define IFXMIPS_DEU_DMA_H +#include #include #include #include #include + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) +#include +#else #include +#endif + #include #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h index d2cfd11..f801c24 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_deu_vr9.h @@ -54,7 +54,13 @@ #include #include #include + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) +#include +#else #include +#endif + #include #include #include "ifxmips_deu.h" diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c index a5f5f90..e546a92 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1.c @@ -40,6 +40,7 @@ /* Project header */ +#include #include #include #include @@ -48,7 +49,13 @@ #include #include #include + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) +#include +#else #include +#endif + #include #if defined(CONFIG_DANUBE) diff --git a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c index a5a6c39..be16152 100644 --- a/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c +++ b/package/kernel/lantiq/ltq-deu/src/ifxmips_sha1_hmac.c @@ -40,6 +40,7 @@ /* Project header */ +#include #include #include #include @@ -47,7 +48,13 @@ #include #include #include + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,2,0) +#include +#else #include +#endif + #include #include diff --git a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c b/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c index 054cac3..36848ee 100644 --- a/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c +++ b/package/kernel/lantiq/ltq-deu/src/ltq_deu_testmgr.c @@ -13,6 +13,8 @@ * */ +#include +#include #include #include #include @@ -475,7 +477,11 @@ static int test_aead(struct crypto_aead *tfm, int enc, aead_request_set_crypt(req, sg, sg, template[i].ilen, iv); +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) aead_request_set_assoc(req, asg, template[i].alen); +#else + aead_request_set_ad(req, template[i].alen); +#endif ret = enc ? crypto_aead_encrypt(req) : @@ -616,7 +622,11 @@ static int test_aead(struct crypto_aead *tfm, int enc, template[i].ilen, iv); +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) aead_request_set_assoc(req, asg, template[i].alen); +#else + aead_request_set_ad(req, template[i].alen); +#endif ret = enc ? crypto_aead_encrypt(req) :