From patchwork Sun Dec 2 20:51:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10708251 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F43E1057 for ; Sun, 2 Dec 2018 20:51:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 368052A80B for ; Sun, 2 Dec 2018 20:51:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2786A2A80C; Sun, 2 Dec 2018 20:51:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 675CE2A515 for ; Sun, 2 Dec 2018 20:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725782AbeLBUvq (ORCPT ); Sun, 2 Dec 2018 15:51:46 -0500 Received: from mx2.mailbox.org ([80.241.60.215]:33802 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbeLBUvq (ORCPT ); Sun, 2 Dec 2018 15:51:46 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 664A9A1152; Sun, 2 Dec 2018 21:51:41 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id rML_Q15KHgSy; Sun, 2 Dec 2018 21:51:40 +0100 (CET) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 1/7] backports: Refresh patches on kernel 4.19.6 Date: Sun, 2 Dec 2018 21:51:25 +0100 Message-Id: <20181202205131.13519-2-hauke@hauke-m.de> In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de> References: <20181202205131.13519-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Hauke Mehrtens --- patches/0014-netlink_seq/net_wireless_nl80211.patch | 2 +- .../drivers_net_wireless_libertas_if_usb.patch | 4 ++-- patches/0077-genl-ro-after-init/hwsim.patch | 2 +- patches/0077-genl-ro-after-init/nl80211.patch | 2 +- patches/0085-iwlwifi-pci-device-removal.patch | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch index 3bbaf287..21dc387f 100644 --- a/patches/0014-netlink_seq/net_wireless_nl80211.patch +++ b/patches/0014-netlink_seq/net_wireless_nl80211.patch @@ -1,6 +1,6 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -8206,7 +8206,9 @@ static int nl80211_dump_scan(struct sk_b +@@ -8207,7 +8207,9 @@ static int nl80211_dump_scan(struct sk_b if (start == 0) cfg80211_bss_expire(rdev); diff --git a/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch b/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch index 6dace46d..30fef4df 100644 --- a/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch +++ b/patches/0016-libertas-olpc-ec-wakeup/drivers_net_wireless_libertas_if_usb.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/marvell/libertas/if_usb.c +++ b/drivers/net/wireless/marvell/libertas/if_usb.c -@@ -938,6 +938,7 @@ static int if_usb_suspend(struct usb_int +@@ -936,6 +936,7 @@ static int if_usb_suspend(struct usb_int goto out; } @@ -8,7 +8,7 @@ #ifdef CONFIG_OLPC if (machine_is_olpc()) { if (priv->wol_criteria == EHS_REMOVE_WAKEUP) -@@ -946,6 +947,7 @@ static int if_usb_suspend(struct usb_int +@@ -944,6 +945,7 @@ static int if_usb_suspend(struct usb_int olpc_ec_wakeup_set(EC_SCI_SRC_WLAN); } #endif diff --git a/patches/0077-genl-ro-after-init/hwsim.patch b/patches/0077-genl-ro-after-init/hwsim.patch index 986e2a04..f949da26 100644 --- a/patches/0077-genl-ro-after-init/hwsim.patch +++ b/patches/0077-genl-ro-after-init/hwsim.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c -@@ -3553,7 +3553,7 @@ static const struct genl_ops hwsim_ops[] +@@ -3551,7 +3551,7 @@ static const struct genl_ops hwsim_ops[] }, }; diff --git a/patches/0077-genl-ro-after-init/nl80211.patch b/patches/0077-genl-ro-after-init/nl80211.patch index bb9f9013..20dcf71f 100644 --- a/patches/0077-genl-ro-after-init/nl80211.patch +++ b/patches/0077-genl-ro-after-init/nl80211.patch @@ -1,6 +1,6 @@ --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -13906,7 +13906,7 @@ static const struct genl_ops nl80211_ops +@@ -13916,7 +13916,7 @@ static const struct genl_ops nl80211_ops }, }; diff --git a/patches/0085-iwlwifi-pci-device-removal.patch b/patches/0085-iwlwifi-pci-device-removal.patch index 6e1f1fff..e6c43a84 100644 --- a/patches/0085-iwlwifi-pci-device-removal.patch +++ b/patches/0085-iwlwifi-pci-device-removal.patch @@ -2,7 +2,7 @@ diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wirel index cc8c53dc0ab6..68296b65a680 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c -@@ -1922,6 +1922,9 @@ static void iwl_trans_pcie_removal_wk(struct work_struct *wk) +@@ -1947,6 +1947,9 @@ static void iwl_trans_pcie_removal_wk(st struct iwl_trans_pcie_removal *removal = container_of(wk, struct iwl_trans_pcie_removal, work); struct pci_dev *pdev = removal->pdev; @@ -12,7 +12,7 @@ index cc8c53dc0ab6..68296b65a680 100644 char *prop[] = {"EVENT=INACCESSIBLE", NULL}; dev_err(&pdev->dev, "Device gone - attempting removal\n"); -@@ -1930,6 +1933,7 @@ static void iwl_trans_pcie_removal_wk(struct work_struct *wk) +@@ -1955,6 +1958,7 @@ static void iwl_trans_pcie_removal_wk(st pci_dev_put(pdev); pci_stop_and_remove_bus_device(pdev); pci_unlock_rescan_remove(); From patchwork Sun Dec 2 20:51:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10708255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0A02B18A7 for ; Sun, 2 Dec 2018 20:51:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F0B4C2A80B for ; Sun, 2 Dec 2018 20:51:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E54A62A80D; Sun, 2 Dec 2018 20:51:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 758212A80B for ; Sun, 2 Dec 2018 20:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725784AbeLBUvs (ORCPT ); Sun, 2 Dec 2018 15:51:48 -0500 Received: from mx1.mailbox.org ([80.241.60.212]:64500 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbeLBUvs (ORCPT ); Sun, 2 Dec 2018 15:51:48 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 501424293B; Sun, 2 Dec 2018 21:51:42 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id t22mn4nI-EdO; Sun, 2 Dec 2018 21:51:41 +0100 (CET) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens , Omer Dagan Subject: [PATCH 2/7] backports: Fix pci_alloc_irq_vectors() backport Date: Sun, 2 Dec 2018 21:51:26 +0100 Message-Id: <20181202205131.13519-3-hauke@hauke-m.de> In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de> References: <20181202205131.13519-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Upstream commit: 55039329e10adc511eabb7cf015d88620bf49176 This copies the pci_alloc_irq_vectors() function from kernel 4.9 and replaces the __pci_enable_msi{x}_range() calls with calls to pci_enable_msi{x}_range(), these were backported to kernel versions < 3.14, so no need to handle the older kernels specially here. This also adds support for MSIx IRQs and adds the PCI_IRQ_* defines. Fixes: 162a6b312f1b ("add support for pci_alloc_irq_vectors") Signed-off-by: Hauke Mehrtens Cc: Omer Dagan --- backport/backport-include/linux/pci.h | 8 ++++++ backport/compat/backport-4.8.c | 49 +++++++++++++++++++++++++---------- 2 files changed, 44 insertions(+), 13 deletions(-) diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h index 531f5a47..3a141bf3 100644 --- a/backport/backport-include/linux/pci.h +++ b/backport/backport-include/linux/pci.h @@ -224,4 +224,12 @@ static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev) #endif/* <4.9.0 but not >= 3.12.69, 4.4.37, 4.8.13 */ +#ifndef PCI_IRQ_LEGACY +#define PCI_IRQ_LEGACY (1 << 0) /* Allow legacy interrupts */ +#define PCI_IRQ_MSI (1 << 1) /* Allow MSI interrupts */ +#define PCI_IRQ_MSIX (1 << 2) /* Allow MSI-X interrupts */ +#define PCI_IRQ_ALL_TYPES \ + (PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX) +#endif + #endif /* _BACKPORT_LINUX_PCI_H */ diff --git a/backport/compat/backport-4.8.c b/backport/compat/backport-4.8.c index a53e39c9..11b2e7d7 100644 --- a/backport/compat/backport-4.8.c +++ b/backport/compat/backport-4.8.c @@ -148,25 +148,48 @@ EXPORT_SYMBOL_GPL(cdc_parse_cdc_header); #ifdef CONFIG_PCI #ifdef CONFIG_PCI_MSI + +/** + * pci_alloc_irq_vectors - allocate multiple IRQs for a device + * @dev: PCI device to operate on + * @min_vecs: minimum number of vectors required (must be >= 1) + * @max_vecs: maximum (desired) number of vectors + * @flags: flags or quirks for the allocation + * + * Allocate up to @max_vecs interrupt vectors for @dev, using MSI-X or MSI + * vectors if available, and fall back to a single legacy vector + * if neither is available. Return the number of vectors allocated, + * (which might be smaller than @max_vecs) if successful, or a negative + * error code on error. If less than @min_vecs interrupt vectors are + * available for @dev the function will fail with -ENOSPC. + * + * To get the Linux IRQ number used for a vector that can be passed to + * request_irq() use the pci_irq_vector() helper. + */ int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs, unsigned int max_vecs, unsigned int flags) { - int res; - int msi_nvect = max_vecs; + int vecs = -ENOSPC; - if (max_vecs < min_vecs) - return -ERANGE; + if (flags & PCI_IRQ_MSIX) { + vecs = pci_enable_msix_range(dev, NULL, min_vecs, max_vecs); + if (vecs > 0) + return vecs; + } + + if (flags & PCI_IRQ_MSI) { + vecs = pci_enable_msi_range(dev, min_vecs, max_vecs); + if (vecs > 0) + return vecs; + } -#if LINUX_VERSION_IS_LESS(3,15,0) - res = pci_enable_msi_block(dev, msi_nvect); - if (res == 0) { - return msi_nvect; + /* use legacy irq if allowed */ + if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1) { + pci_intx(dev, 1); + return 1; } -#else - res = pci_enable_msi_range(dev, msi_nvect, msi_nvect); - return msi_nvect; -#endif /*LINUX_VERSION_IS_LESS(3,15,0)*/ - return -ENOSPC; + + return vecs; } EXPORT_SYMBOL_GPL(pci_alloc_irq_vectors); #endif /* CONFIG_PCI_MSI */ From patchwork Sun Dec 2 20:51:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10708265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0BA8C13AF for ; Sun, 2 Dec 2018 20:51:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF8572A515 for ; Sun, 2 Dec 2018 20:51:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E1EFA2A80C; Sun, 2 Dec 2018 20:51:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 998162A515 for ; Sun, 2 Dec 2018 20:51:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725785AbeLBUvs (ORCPT ); Sun, 2 Dec 2018 15:51:48 -0500 Received: from mx1.mailbox.org ([80.241.60.212]:64510 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbeLBUvs (ORCPT ); Sun, 2 Dec 2018 15:51:48 -0500 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 86B8140552; Sun, 2 Dec 2018 21:51:42 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id U-DtRH8TxTEK; Sun, 2 Dec 2018 21:51:41 +0100 (CET) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 3/7] backports: Revert "dependencies: Make WIL6210 depend on kernel >= 4.8" Date: Sun, 2 Dec 2018 21:51:27 +0100 Message-Id: <20181202205131.13519-4-hauke@hauke-m.de> In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de> References: <20181202205131.13519-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Upstream commit: d1a24f43fcd0c1ab60a3e6786ef024e55792a49c pci_alloc_irq_vectors() was added in commit 162a6b312f1 ("add support for pci_alloc_irq_vectors"), with this backport the WIL6210 driver works again. This reverts commit fbafdbe972402aad051d91d557f9cbb272844939. Signed-off-by: Hauke Mehrtens --- dependencies | 3 --- 1 file changed, 3 deletions(-) diff --git a/dependencies b/dependencies index 84bffd77..0fecb720 100644 --- a/dependencies +++ b/dependencies @@ -80,6 +80,3 @@ MT76x2U 4.1 # select_queue_fallback_t is missing RTL8723BS 3.14 R8188EU 3.14 - -# pci_alloc_irq_vectors is missing -WIL6210 4.8 From patchwork Sun Dec 2 20:51:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10708263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7228913AF for ; Sun, 2 Dec 2018 20:51:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 641CB2A80B for ; Sun, 2 Dec 2018 20:51:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 587BC2A80D; Sun, 2 Dec 2018 20:51:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 218732A80C for ; Sun, 2 Dec 2018 20:51:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725781AbeLBUvu (ORCPT ); Sun, 2 Dec 2018 15:51:50 -0500 Received: from mx1.mailbox.org ([80.241.60.212]:64540 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725778AbeLBUvu (ORCPT ); Sun, 2 Dec 2018 15:51:50 -0500 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 8FECC4346F; Sun, 2 Dec 2018 21:51:43 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id gKH7p6b2OBLv; Sun, 2 Dec 2018 21:51:42 +0100 (CET) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 4/7] backports: Remove BPAUTO_CRYPTO_SKCIPHER Date: Sun, 2 Dec 2018 21:51:28 +0100 Message-Id: <20181202205131.13519-5-hauke@hauke-m.de> In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de> References: <20181202205131.13519-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Upstream commit: 8d44ac2d83184f5de2f76e620fde7dc58a5c0b82 This was added in commit 32751c901728 ("backport: add crypto skcipher interface"), but all the drivers which need it were deactivated in commit cdcec8e6128 ("backports: disable things needing LIB80211 unless SKCIPHER can exist") because it does not compile any more. Remove this code now completely from the tree and keep these drivers deactivated on kernel < 4.3. Signed-off-by: Hauke Mehrtens --- backport/backport-include/crypto/skcipher.h | 454 ---------------------------- backport/compat/Kconfig | 8 - backport/compat/Makefile | 2 - patches/crypto-skcipher.patch | 32 -- 4 files changed, 496 deletions(-) delete mode 100644 backport/backport-include/crypto/skcipher.h delete mode 100644 patches/crypto-skcipher.patch diff --git a/backport/backport-include/crypto/skcipher.h b/backport/backport-include/crypto/skcipher.h deleted file mode 100644 index 73ba7830..00000000 --- a/backport/backport-include/crypto/skcipher.h +++ /dev/null @@ -1,454 +0,0 @@ -#ifndef _BACKPORT_CRYPTO_SKCIPHER_H -#define _BACKPORT_CRYPTO_SKCIPHER_H -#include_next -#include - -#if LINUX_VERSION_IS_LESS(4,3,0) -/** - * struct skcipher_request - Symmetric key cipher request - * @cryptlen: Number of bytes to encrypt or decrypt - * @iv: Initialisation Vector - * @src: Source SG list - * @dst: Destination SG list - * @base: Underlying async request request - * @__ctx: Start of private context data - */ -#define skcipher_request LINUX_BACKPORT(skcipher_request) -struct skcipher_request { - unsigned int cryptlen; - - u8 *iv; - - struct scatterlist *src; - struct scatterlist *dst; - - struct crypto_async_request base; - - void *__ctx[] CRYPTO_MINALIGN_ATTR; -}; - -#define crypto_skcipher LINUX_BACKPORT(crypto_skcipher) -struct crypto_skcipher { - int (*setkey)(struct crypto_skcipher *tfm, const u8 *key, - unsigned int keylen); - int (*encrypt)(struct skcipher_request *req); - int (*decrypt)(struct skcipher_request *req); - - unsigned int ivsize; - unsigned int reqsize; - unsigned int keysize; - - struct crypto_tfm base; -}; - -#ifndef SKCIPHER_REQUEST_ON_STACK -#define SKCIPHER_REQUEST_ON_STACK(name, tfm) \ - char __##name##_desc[sizeof(struct skcipher_request) + \ - crypto_skcipher_reqsize(tfm)] CRYPTO_MINALIGN_ATTR; \ - struct skcipher_request *name = (void *)__##name##_desc -#endif - -/** - * DOC: Symmetric Key Cipher API - * - * Symmetric key cipher API is used with the ciphers of type - * CRYPTO_ALG_TYPE_SKCIPHER (listed as type "skcipher" in /proc/crypto). - * - * Asynchronous cipher operations imply that the function invocation for a - * cipher request returns immediately before the completion of the operation. - * The cipher request is scheduled as a separate kernel thread and therefore - * load-balanced on the different CPUs via the process scheduler. To allow - * the kernel crypto API to inform the caller about the completion of a cipher - * request, the caller must provide a callback function. That function is - * invoked with the cipher handle when the request completes. - * - * To support the asynchronous operation, additional information than just the - * cipher handle must be supplied to the kernel crypto API. That additional - * information is given by filling in the skcipher_request data structure. - * - * For the symmetric key cipher API, the state is maintained with the tfm - * cipher handle. A single tfm can be used across multiple calls and in - * parallel. For asynchronous block cipher calls, context data supplied and - * only used by the caller can be referenced the request data structure in - * addition to the IV used for the cipher request. The maintenance of such - * state information would be important for a crypto driver implementer to - * have, because when calling the callback function upon completion of the - * cipher operation, that callback function may need some information about - * which operation just finished if it invoked multiple in parallel. This - * state information is unused by the kernel crypto API. - */ - -#define __crypto_skcipher_cast LINUX_BACKPORT(__crypto_skcipher_cast) -static inline struct crypto_skcipher *__crypto_skcipher_cast( - struct crypto_tfm *tfm) -{ - return container_of(tfm, struct crypto_skcipher, base); -} - -/** - * crypto_alloc_skcipher() - allocate symmetric key cipher handle - * @alg_name: is the cra_name / name or cra_driver_name / driver name of the - * skcipher cipher - * @type: specifies the type of the cipher - * @mask: specifies the mask for the cipher - * - * Allocate a cipher handle for an skcipher. The returned struct - * crypto_skcipher is the cipher handle that is required for any subsequent - * API invocation for that skcipher. - * - * Return: allocated cipher handle in case of success; IS_ERR() is true in case - * of an error, PTR_ERR() returns the error code. - */ -#define crypto_alloc_skcipher LINUX_BACKPORT(crypto_alloc_skcipher) -struct crypto_skcipher *crypto_alloc_skcipher(const char *alg_name, - u32 type, u32 mask); - -#define crypto_skcipher_tfm LINUX_BACKPORT(crypto_skcipher_tfm) -static inline struct crypto_tfm *crypto_skcipher_tfm( - struct crypto_skcipher *tfm) -{ - return &tfm->base; -} - -/** - * crypto_free_skcipher() - zeroize and free cipher handle - * @tfm: cipher handle to be freed - */ -#define crypto_free_skcipher LINUX_BACKPORT(crypto_free_skcipher) -static inline void crypto_free_skcipher(struct crypto_skcipher *tfm) -{ - crypto_destroy_tfm(tfm, crypto_skcipher_tfm(tfm)); -} - -/** - * crypto_has_skcipher() - Search for the availability of an skcipher. - * @alg_name: is the cra_name / name or cra_driver_name / driver name of the - * skcipher - * @type: specifies the type of the cipher - * @mask: specifies the mask for the cipher - * - * Return: true when the skcipher is known to the kernel crypto API; false - * otherwise - */ -#define crypto_has_skcipher LINUX_BACKPORT(crypto_has_skcipher) -static inline int crypto_has_skcipher(const char *alg_name, u32 type, - u32 mask) -{ - return crypto_has_alg(alg_name, crypto_skcipher_type(type), - crypto_skcipher_mask(mask)); -} - -#define crypto_skcipher_driver_name LINUX_BACKPORT(crypto_skcipher_driver_name) -static inline const char *crypto_skcipher_driver_name( - struct crypto_skcipher *tfm) -{ - return crypto_tfm_alg_driver_name(crypto_skcipher_tfm(tfm)); -} - -/** - * crypto_skcipher_ivsize() - obtain IV size - * @tfm: cipher handle - * - * The size of the IV for the skcipher referenced by the cipher handle is - * returned. This IV size may be zero if the cipher does not need an IV. - * - * Return: IV size in bytes - */ -#define crypto_skcipher_ivsize LINUX_BACKPORT(crypto_skcipher_ivsize) -static inline unsigned int crypto_skcipher_ivsize(struct crypto_skcipher *tfm) -{ - return tfm->ivsize; -} - -/** - * crypto_skcipher_blocksize() - obtain block size of cipher - * @tfm: cipher handle - * - * The block size for the skcipher referenced with the cipher handle is - * returned. The caller may use that information to allocate appropriate - * memory for the data returned by the encryption or decryption operation - * - * Return: block size of cipher - */ -#define crypto_skcipher_blocksize LINUX_BACKPORT(crypto_skcipher_blocksize) -static inline unsigned int crypto_skcipher_blocksize( - struct crypto_skcipher *tfm) -{ - return crypto_tfm_alg_blocksize(crypto_skcipher_tfm(tfm)); -} - -#define crypto_skcipher_alignmask LINUX_BACKPORT(crypto_skcipher_alignmask) -static inline unsigned int crypto_skcipher_alignmask( - struct crypto_skcipher *tfm) -{ - return crypto_tfm_alg_alignmask(crypto_skcipher_tfm(tfm)); -} - -#define crypto_skcipher_get_flags LINUX_BACKPORT(crypto_skcipher_get_flags) -static inline u32 crypto_skcipher_get_flags(struct crypto_skcipher *tfm) -{ - return crypto_tfm_get_flags(crypto_skcipher_tfm(tfm)); -} - -#define crypto_skcipher_set_flags LINUX_BACKPORT(crypto_skcipher_set_flags) -static inline void crypto_skcipher_set_flags(struct crypto_skcipher *tfm, - u32 flags) -{ - crypto_tfm_set_flags(crypto_skcipher_tfm(tfm), flags); -} - -#define crypto_skcipher_clear_flags LINUX_BACKPORT(crypto_skcipher_clear_flags) -static inline void crypto_skcipher_clear_flags(struct crypto_skcipher *tfm, - u32 flags) -{ - crypto_tfm_clear_flags(crypto_skcipher_tfm(tfm), flags); -} - -/** - * crypto_skcipher_setkey() - set key for cipher - * @tfm: cipher handle - * @key: buffer holding the key - * @keylen: length of the key in bytes - * - * The caller provided key is set for the skcipher referenced by the cipher - * handle. - * - * Note, the key length determines the cipher type. Many block ciphers implement - * different cipher modes depending on the key size, such as AES-128 vs AES-192 - * vs. AES-256. When providing a 16 byte key for an AES cipher handle, AES-128 - * is performed. - * - * Return: 0 if the setting of the key was successful; < 0 if an error occurred - */ -#define crypto_skcipher_setkey LINUX_BACKPORT(crypto_skcipher_setkey) -static inline int crypto_skcipher_setkey(struct crypto_skcipher *tfm, - const u8 *key, unsigned int keylen) -{ - return tfm->setkey(tfm, key, keylen); -} - -#define crypto_skcipher_has_setkey LINUX_BACKPORT(crypto_skcipher_has_setkey) -static inline bool crypto_skcipher_has_setkey(struct crypto_skcipher *tfm) -{ - return tfm->keysize; -} - -#define crypto_skcipher_default_keysize LINUX_BACKPORT(crypto_skcipher_default_keysize) -static inline unsigned int crypto_skcipher_default_keysize( - struct crypto_skcipher *tfm) -{ - return tfm->keysize; -} - -/** - * crypto_skcipher_reqtfm() - obtain cipher handle from request - * @req: skcipher_request out of which the cipher handle is to be obtained - * - * Return the crypto_skcipher handle when furnishing an skcipher_request - * data structure. - * - * Return: crypto_skcipher handle - */ -#define crypto_skcipher_reqtfm LINUX_BACKPORT(crypto_skcipher_reqtfm) -static inline struct crypto_skcipher *crypto_skcipher_reqtfm( - struct skcipher_request *req) -{ - return __crypto_skcipher_cast(req->base.tfm); -} - -/** - * crypto_skcipher_encrypt() - encrypt plaintext - * @req: reference to the skcipher_request handle that holds all information - * needed to perform the cipher operation - * - * Encrypt plaintext data using the skcipher_request handle. That data - * structure and how it is filled with data is discussed with the - * skcipher_request_* functions. - * - * Return: 0 if the cipher operation was successful; < 0 if an error occurred - */ -#define crypto_skcipher_encrypt LINUX_BACKPORT(crypto_skcipher_encrypt) -static inline int crypto_skcipher_encrypt(struct skcipher_request *req) -{ - struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); - - return tfm->encrypt(req); -} - -/** - * crypto_skcipher_decrypt() - decrypt ciphertext - * @req: reference to the skcipher_request handle that holds all information - * needed to perform the cipher operation - * - * Decrypt ciphertext data using the skcipher_request handle. That data - * structure and how it is filled with data is discussed with the - * skcipher_request_* functions. - * - * Return: 0 if the cipher operation was successful; < 0 if an error occurred - */ -#define crypto_skcipher_decrypt LINUX_BACKPORT(crypto_skcipher_decrypt) -static inline int crypto_skcipher_decrypt(struct skcipher_request *req) -{ - struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); - - return tfm->decrypt(req); -} - -/** - * DOC: Symmetric Key Cipher Request Handle - * - * The skcipher_request data structure contains all pointers to data - * required for the symmetric key cipher operation. This includes the cipher - * handle (which can be used by multiple skcipher_request instances), pointer - * to plaintext and ciphertext, asynchronous callback function, etc. It acts - * as a handle to the skcipher_request_* API calls in a similar way as - * skcipher handle to the crypto_skcipher_* API calls. - */ - -/** - * crypto_skcipher_reqsize() - obtain size of the request data structure - * @tfm: cipher handle - * - * Return: number of bytes - */ -#define crypto_skcipher_reqsize LINUX_BACKPORT(crypto_skcipher_reqsize) -static inline unsigned int crypto_skcipher_reqsize(struct crypto_skcipher *tfm) -{ - return tfm->reqsize; -} - -/** - * skcipher_request_set_tfm() - update cipher handle reference in request - * @req: request handle to be modified - * @tfm: cipher handle that shall be added to the request handle - * - * Allow the caller to replace the existing skcipher handle in the request - * data structure with a different one. - */ -#define skcipher_request_set_tfm LINUX_BACKPORT(skcipher_request_set_tfm) -static inline void skcipher_request_set_tfm(struct skcipher_request *req, - struct crypto_skcipher *tfm) -{ - req->base.tfm = crypto_skcipher_tfm(tfm); -} - -#define skcipher_request_cast LINUX_BACKPORT(skcipher_request_cast) -static inline struct skcipher_request *skcipher_request_cast( - struct crypto_async_request *req) -{ - return container_of(req, struct skcipher_request, base); -} - -/** - * skcipher_request_alloc() - allocate request data structure - * @tfm: cipher handle to be registered with the request - * @gfp: memory allocation flag that is handed to kmalloc by the API call. - * - * Allocate the request data structure that must be used with the skcipher - * encrypt and decrypt API calls. During the allocation, the provided skcipher - * handle is registered in the request data structure. - * - * Return: allocated request handle in case of success; IS_ERR() is true in case - * of an error, PTR_ERR() returns the error code. - */ -#define skcipher_request LINUX_BACKPORT(skcipher_request) -static inline struct skcipher_request *skcipher_request_alloc( - struct crypto_skcipher *tfm, gfp_t gfp) -{ - struct skcipher_request *req; - - req = kmalloc(sizeof(struct skcipher_request) + - crypto_skcipher_reqsize(tfm), gfp); - - if (likely(req)) - skcipher_request_set_tfm(req, tfm); - - return req; -} - -/** - * skcipher_request_free() - zeroize and free request data structure - * @req: request data structure cipher handle to be freed - */ -#define skcipher_request_free LINUX_BACKPORT(skcipher_request_free) -static inline void skcipher_request_free(struct skcipher_request *req) -{ - kzfree(req); -} - -/** - * skcipher_request_set_callback() - set asynchronous callback function - * @req: request handle - * @flags: specify zero or an ORing of the flags - * CRYPTO_TFM_REQ_MAY_BACKLOG the request queue may back log and - * increase the wait queue beyond the initial maximum size; - * CRYPTO_TFM_REQ_MAY_SLEEP the request processing may sleep - * @compl: callback function pointer to be registered with the request handle - * @data: The data pointer refers to memory that is not used by the kernel - * crypto API, but provided to the callback function for it to use. Here, - * the caller can provide a reference to memory the callback function can - * operate on. As the callback function is invoked asynchronously to the - * related functionality, it may need to access data structures of the - * related functionality which can be referenced using this pointer. The - * callback function can access the memory via the "data" field in the - * crypto_async_request data structure provided to the callback function. - * - * This function allows setting the callback function that is triggered once the - * cipher operation completes. - * - * The callback function is registered with the skcipher_request handle and - * must comply with the following template - * - * void callback_function(struct crypto_async_request *req, int error) - */ -#define skcipher_request_set_callback LINUX_BACKPORT(skcipher_request_set_callback) -static inline void skcipher_request_set_callback(struct skcipher_request *req, - u32 flags, - crypto_completion_t compl, - void *data) -{ - req->base.complete = compl; - req->base.data = data; - req->base.flags = flags; -} - -/** - * skcipher_request_set_crypt() - set data buffers - * @req: request handle - * @src: source scatter / gather list - * @dst: destination scatter / gather list - * @cryptlen: number of bytes to process from @src - * @iv: IV for the cipher operation which must comply with the IV size defined - * by crypto_skcipher_ivsize - * - * This function allows setting of the source data and destination data - * scatter / gather lists. - * - * For encryption, the source is treated as the plaintext and the - * destination is the ciphertext. For a decryption operation, the use is - * reversed - the source is the ciphertext and the destination is the plaintext. - */ -#define skcipher_request_set_crypt LINUX_BACKPORT(skcipher_request_set_crypt) -static inline void skcipher_request_set_crypt( - struct skcipher_request *req, - struct scatterlist *src, struct scatterlist *dst, - unsigned int cryptlen, void *iv) -{ - req->src = src; - req->dst = dst; - req->cryptlen = cryptlen; - req->iv = iv; -} -#endif /* < 4.3 */ - -#if LINUX_VERSION_IS_LESS(4,6,0) -#define skcipher_request_zero LINUX_BACKPORT(skcipher_request_zero) -static inline void skcipher_request_zero(struct skcipher_request *req) -{ - struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); - - memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); -} -#endif /* < 4.6 */ - -#endif /* _BACKPORT_CRYPTO_SKCIPHER_H */ diff --git a/backport/compat/Kconfig b/backport/compat/Kconfig index f88a646e..bb5d864c 100644 --- a/backport/compat/Kconfig +++ b/backport/compat/Kconfig @@ -102,14 +102,6 @@ config BPAUTO_USERSEL_BUILD_ALL It's only really useful for compat testing, so you probably shouldn't enable it. -config BPAUTO_CRYPTO_SKCIPHER - tristate - depends on KERNEL_4_3 - default y if BACKPORTED_LIB80211_CRYPT_WEP - default y if BACKPORTED_LIB80211_CRYPT_TKIP - #c-file crypto/skcipher.c - #module-name skcipher - config BPAUTO_WANT_DEV_COREDUMP bool diff --git a/backport/compat/Makefile b/backport/compat/Makefile index fdc68c8b..99b52faa 100644 --- a/backport/compat/Makefile +++ b/backport/compat/Makefile @@ -41,8 +41,6 @@ compat-$(CPTCFG_KERNEL_4_20) += backport-4.20.o compat-$(CPTCFG_KERNEL_4_20) += backport-genetlink.o -compat-$(CPTCFG_BPAUTO_CRYPTO_SKCIPHER) += crypto-skcipher.o - compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/verify.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7.asn1.o compat-$(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) += verification/pkcs7_verify.o diff --git a/patches/crypto-skcipher.patch b/patches/crypto-skcipher.patch deleted file mode 100644 index 99eedb24..00000000 --- a/patches/crypto-skcipher.patch +++ /dev/null @@ -1,32 +0,0 @@ ---- a/compat/crypto-skcipher.c -+++ b/compat/crypto-skcipher.c -@@ -26,7 +26,28 @@ - #include - #include - --#include "internal.h" -+struct crypto_tfm *__crypto_alloc_tfm(struct crypto_alg *alg, u32 type, -+ u32 mask); -+ -+void *crypto_alloc_tfm(const char *alg_name, -+ const struct crypto_type *frontend, u32 type, u32 mask); -+ -+struct crypto_alg *crypto_mod_get(struct crypto_alg *alg); -+ -+static inline void *crypto_skcipher_ctx(struct crypto_skcipher *tfm) -+{ -+ return crypto_tfm_ctx(&tfm->base); -+} -+ -+static inline void *skcipher_request_ctx(struct skcipher_request *req) -+{ -+ return req->__ctx; -+} -+ -+static inline u32 skcipher_request_flags(struct skcipher_request *req) -+{ -+ return req->base.flags; -+} - - enum { - SKCIPHER_WALK_PHYS = 1 << 0, From patchwork Sun Dec 2 20:51:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10708257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 29BA513AF for ; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19A2F2A80B for ; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DED02A80D; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BADD92A80B for ; Sun, 2 Dec 2018 20:51:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725786AbeLBUvt (ORCPT ); Sun, 2 Dec 2018 15:51:49 -0500 Received: from mx1.mailbox.org ([80.241.60.212]:64548 "EHLO mx1.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbeLBUvt (ORCPT ); Sun, 2 Dec 2018 15:51:49 -0500 Received: from smtp2.mailbox.org (unknown [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id C12E24338E; Sun, 2 Dec 2018 21:51:43 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id jYPWnTMu8qu6; Sun, 2 Dec 2018 21:51:42 +0100 (CET) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 5/7] backports: Do not activate R8188EU on kernels without SKCIPHER Date: Sun, 2 Dec 2018 21:51:29 +0100 Message-Id: <20181202205131.13519-6-hauke@hauke-m.de> In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de> References: <20181202205131.13519-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This driver was missing in the list of the other lib80211 driver using SKCIPHER. Signed-off-by: Hauke Mehrtens --- dependencies | 1 + 1 file changed, 1 insertion(+) diff --git a/dependencies b/dependencies index 0fecb720..20f61ee7 100644 --- a/dependencies +++ b/dependencies @@ -60,6 +60,7 @@ IPW2100 4.3 IPW2200 4.3 HOSTAP 4.3 LIBERTAS 4.3 +R8188EU 4.3 # struct ethtool_link_ksettings is missing, I'm lazy USB_USBNET 4.6 From patchwork Sun Dec 2 20:51:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10708259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C0CEF17F0 for ; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B3B522A80B for ; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A7F7F2A80D; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4477F2A80B for ; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725788AbeLBUvt (ORCPT ); Sun, 2 Dec 2018 15:51:49 -0500 Received: from mx2.mailbox.org ([80.241.60.215]:33884 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725780AbeLBUvt (ORCPT ); Sun, 2 Dec 2018 15:51:49 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 05D1EA10FC; Sun, 2 Dec 2018 21:51:44 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id qVNnFy8MtB8c; Sun, 2 Dec 2018 21:51:43 +0100 (CET) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 6/7] backports: Add missing includes for mt76 driver. Date: Sun, 2 Dec 2018 21:51:30 +0100 Message-Id: <20181202205131.13519-7-hauke@hauke-m.de> In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de> References: <20181202205131.13519-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch was taken from kernel 4.20. Signed-off-by: Hauke Mehrtens --- patches/0013-fix-makefile-includes/mt76.patch | 49 +++++++++++++++++++++++++++ patches/0090-use-skb_pad.patch | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 patches/0013-fix-makefile-includes/mt76.patch diff --git a/patches/0013-fix-makefile-includes/mt76.patch b/patches/0013-fix-makefile-includes/mt76.patch new file mode 100644 index 00000000..9edf61f2 --- /dev/null +++ b/patches/0013-fix-makefile-includes/mt76.patch @@ -0,0 +1,49 @@ +From db6bb5c6c19451faa935934e6b45416fd7dd777a Mon Sep 17 00:00:00 2001 +From: Felix Fietkau +Date: Mon, 24 Sep 2018 11:13:11 +0200 +Subject: mt76: include linux/module.h in files using MODULE_* + +Fix source files using MODULE_* macros without including linux/module.h + +Signed-off-by: Felix Fietkau + +--- a/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c ++++ b/drivers/net/wireless/mediatek/mt76/mt76x0/eeprom.c +@@ -13,6 +13,7 @@ + * GNU General Public License for more details. + */ + ++#include + #include + #include + #include +--- a/drivers/net/wireless/mediatek/mt76/usb_mcu.c ++++ b/drivers/net/wireless/mediatek/mt76/usb_mcu.c +@@ -14,6 +14,7 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#include + #include + + #include "mt76.h" +--- a/drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c ++++ b/drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c +@@ -14,6 +14,7 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#include + #include + #include "mt76x2.h" + #include "mt76x2_eeprom.h" +--- a/drivers/net/wireless/mediatek/mt76/usb.c ++++ b/drivers/net/wireless/mediatek/mt76/usb.c +@@ -14,6 +14,7 @@ + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + ++#include + #include "mt76.h" + #include "usb_trace.h" + #include "dma.h" diff --git a/patches/0090-use-skb_pad.patch b/patches/0090-use-skb_pad.patch index 086328c1..9f29d6cb 100644 --- a/patches/0090-use-skb_pad.patch +++ b/patches/0090-use-skb_pad.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/mediatek/mt76/usb.c +++ b/drivers/net/wireless/mediatek/mt76/usb.c -@@ -535,7 +535,7 @@ int mt76u_skb_dma_info(struct sk_buff *s +@@ -536,7 +536,7 @@ int mt76u_skb_dma_info(struct sk_buff *s } if (unlikely(pad)) { From patchwork Sun Dec 2 20:51:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 10708261 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4FABB1057 for ; Sun, 2 Dec 2018 20:51:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 431F42A80B for ; Sun, 2 Dec 2018 20:51:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 37BE72A80E; Sun, 2 Dec 2018 20:51:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D43422A80B for ; Sun, 2 Dec 2018 20:51:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725780AbeLBUvu (ORCPT ); Sun, 2 Dec 2018 15:51:50 -0500 Received: from mx2.mailbox.org ([80.241.60.215]:33910 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbeLBUvu (ORCPT ); Sun, 2 Dec 2018 15:51:50 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id E8D4DA1167; Sun, 2 Dec 2018 21:51:44 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id JtwoOttyiNrj; Sun, 2 Dec 2018 21:51:43 +0100 (CET) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 7/7] backports: Add skcipher_request_zero() Date: Sun, 2 Dec 2018 21:51:31 +0100 Message-Id: <20181202205131.13519-8-hauke@hauke-m.de> In-Reply-To: <20181202205131.13519-1-hauke@hauke-m.de> References: <20181202205131.13519-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This was added in commit 1aaa753d918 ("crypto: skcipher - Add helper to zero stack request") This is needed by lib80211, the code changes in kernel 4.20, so this is only needed in kernel 4.19. Signed-off-by: Hauke Mehrtens --- backport/backport-include/crypto/skcipher.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 backport/backport-include/crypto/skcipher.h diff --git a/backport/backport-include/crypto/skcipher.h b/backport/backport-include/crypto/skcipher.h new file mode 100644 index 00000000..19a5a73d --- /dev/null +++ b/backport/backport-include/crypto/skcipher.h @@ -0,0 +1,14 @@ +#ifndef __BP_CRYPTO_SKCIPHER_H +#define __BP_CRYPTO_SKCIPHER_H +#include_next + +#if LINUX_VERSION_IS_LESS(4,6,0) +static inline void skcipher_request_zero(struct skcipher_request *req) +{ + struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); + + memzero_explicit(req, sizeof(*req) + crypto_skcipher_reqsize(tfm)); +} +#endif + +#endif /* __BP_CRYPTO_SKCIPHER_H */