From patchwork Mon Apr 20 22:16:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499981 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BA8266CA for ; Mon, 20 Apr 2020 22:16:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A7F4820857 for ; Mon, 20 Apr 2020 22:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726906AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:34556 "EHLO mout-p-103.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbgDTWQb (ORCPT ); Mon, 20 Apr 2020 18:16:31 -0400 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 mout-p-103.mailbox.org (Postfix) with ESMTPS id 495gyh6Q8LzKmXF; Tue, 21 Apr 2020 00:16:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id Uo7CasGcBwIy; Tue, 21 Apr 2020 00:16:25 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 1/9] backports: Refresh patches on kernel 5.7-rc2 Date: Tue, 21 Apr 2020 00:16:07 +0200 Message-Id: <20200420221615.14734-2-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 09956173E X-Rspamd-Score: -5.67 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Signed-off-by: Hauke Mehrtens --- patches/0002-disable-dump-adjust-on-old-kernels.patch | 4 ++-- patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch | 4 ++-- .../0010-add-wext-handlers-to-netdev/net_wireless_core.patch | 2 +- patches/0014-netlink_seq/net_wireless_nl80211.patch | 2 +- patches/0024-led-blink-api/mac80211.patch | 2 +- patches/0028-select_queue/mac80211.patch | 4 ++-- patches/0053-possible_net_t.patch | 2 +- patches/0069-iwlwifi-pd-string-fix.patch | 2 +- patches/0070-mac80211-fils.patch | 4 ++-- patches/0071-skb-head_frag/wireless.patch | 2 +- patches/0077-genl-ro-after-init/hwsim.patch | 2 +- patches/0077-genl-ro-after-init/nl80211.patch | 2 +- patches/0079-netdev-destructor/brcmfmac.patch | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/patches/0002-disable-dump-adjust-on-old-kernels.patch b/patches/0002-disable-dump-adjust-on-old-kernels.patch index 5a41edfb..7ef4e282 100644 --- a/patches/0002-disable-dump-adjust-on-old-kernels.patch +++ b/patches/0002-disable-dump-adjust-on-old-kernels.patch @@ -28,7 +28,7 @@ Date: Fri Mar 1 14:03:49 2013 +0100 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c -@@ -2550,6 +2550,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2686,6 +2686,7 @@ static int nl80211_dump_wiphy(struct sk_ cb->nlh->nlmsg_seq, NLM_F_MULTI, state); if (ret < 0) { @@ -36,7 +36,7 @@ Date: Fri Mar 1 14:03:49 2013 +0100 /* * If sending the wiphy data didn't fit (ENOBUFS * or EMSGSIZE returned), this SKB is still -@@ -2571,6 +2572,7 @@ static int nl80211_dump_wiphy(struct sk_ +@@ -2707,6 +2708,7 @@ static int nl80211_dump_wiphy(struct sk_ rtnl_unlock(); return 1; } diff --git a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch index 11c50887..678fdb79 100644 --- a/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch +++ b/patches/0003-cfg80211-wext-padding/include_net_cfg80211.patch @@ -1,12 +1,12 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -4552,6 +4552,9 @@ struct cfg80211_pmsr_capabilities { +@@ -4695,6 +4695,9 @@ struct wiphy_iftype_akm_suites { struct wiphy { /* assign these fields before you register the wiphy */ +#define WIPHY_COMPAT_PAD_SIZE 2048 + u8 padding[WIPHY_COMPAT_PAD_SIZE]; + - /* permanent MAC address(es) */ u8 perm_addr[ETH_ALEN]; u8 addr_mask[ETH_ALEN]; + diff --git a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch index 6b14d347..7d34737f 100644 --- a/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch +++ b/patches/0010-add-wext-handlers-to-netdev/net_wireless_core.patch @@ -11,7 +11,7 @@ device_initialize(&rdev->wiphy.dev); rdev->wiphy.dev.class = &ieee80211_class; rdev->wiphy.dev.platform_data = rdev; -@@ -1296,6 +1292,15 @@ static int cfg80211_netdev_notifier_call +@@ -1302,6 +1298,15 @@ static int cfg80211_netdev_notifier_call } wdev->netdev = dev; #ifdef CONFIG_CFG80211_WEXT diff --git a/patches/0014-netlink_seq/net_wireless_nl80211.patch b/patches/0014-netlink_seq/net_wireless_nl80211.patch index c9442de4..0c3350b2 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 -@@ -8781,7 +8781,9 @@ static int nl80211_dump_scan(struct sk_b +@@ -8998,7 +8998,9 @@ static int nl80211_dump_scan(struct sk_b if (start == 0) cfg80211_bss_expire(rdev); diff --git a/patches/0024-led-blink-api/mac80211.patch b/patches/0024-led-blink-api/mac80211.patch index 99b78d0c..1f183a84 100644 --- a/patches/0024-led-blink-api/mac80211.patch +++ b/patches/0024-led-blink-api/mac80211.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h -@@ -1310,6 +1310,7 @@ struct ieee80211_local { +@@ -1314,6 +1314,7 @@ struct ieee80211_local { struct mutex chanctx_mtx; #ifdef CONFIG_MAC80211_LEDS diff --git a/patches/0028-select_queue/mac80211.patch b/patches/0028-select_queue/mac80211.patch index f488589d..be237b2a 100644 --- a/patches/0028-select_queue/mac80211.patch +++ b/patches/0028-select_queue/mac80211.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c -@@ -1128,9 +1128,29 @@ static void ieee80211_uninit(struct net_ +@@ -1127,9 +1127,29 @@ static void ieee80211_uninit(struct net_ ieee80211_teardown_sdata(IEEE80211_DEV_TO_SUB_IF(dev)); } @@ -30,7 +30,7 @@ { return ieee80211_select_queue(IEEE80211_DEV_TO_SUB_IF(dev), skb); } -@@ -1173,9 +1193,29 @@ static const struct net_device_ops ieee8 +@@ -1172,9 +1192,29 @@ static const struct net_device_ops ieee8 .ndo_get_stats64 = ieee80211_get_stats64, }; diff --git a/patches/0053-possible_net_t.patch b/patches/0053-possible_net_t.patch index 596aa90d..e2015172 100644 --- a/patches/0053-possible_net_t.patch +++ b/patches/0053-possible_net_t.patch @@ -2,7 +2,7 @@ diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 04e5785..a251da1 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -4701,12 +4701,12 @@ struct wiphy { +@@ -4838,12 +4838,12 @@ struct wiphy { static inline struct net *wiphy_net(struct wiphy *wiphy) { diff --git a/patches/0069-iwlwifi-pd-string-fix.patch b/patches/0069-iwlwifi-pd-string-fix.patch index f4580157..bb05f4c4 100644 --- a/patches/0069-iwlwifi-pd-string-fix.patch +++ b/patches/0069-iwlwifi-pd-string-fix.patch @@ -60,7 +60,7 @@ mvm->debugfs_dir, buf); --- a/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/debugfs.c -@@ -2085,6 +2085,12 @@ void iwl_mvm_dbgfs_register(struct iwl_m +@@ -2089,6 +2089,12 @@ void iwl_mvm_dbgfs_register(struct iwl_m * Create a symlink with mac80211. It will be removed when mac80211 * exists (before the opmode exists which removes the target.) */ diff --git a/patches/0070-mac80211-fils.patch b/patches/0070-mac80211-fils.patch index 9a619c68..9da4a8da 100644 --- a/patches/0070-mac80211-fils.patch +++ b/patches/0070-mac80211-fils.patch @@ -42,7 +42,7 @@ #endif /* FILS_AEAD_H */ --- a/net/mac80211/main.c +++ b/net/mac80211/main.c -@@ -571,7 +571,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_ +@@ -586,7 +586,9 @@ struct ieee80211_hw *ieee80211_alloc_hw_ NL80211_FEATURE_MAC_ON_CREATE | NL80211_FEATURE_USERSPACE_MPM | NL80211_FEATURE_FULL_AP_CLIENT_STATE; @@ -51,4 +51,4 @@ +#endif wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211); - + wiphy_ext_feature_set(wiphy, diff --git a/patches/0071-skb-head_frag/wireless.patch b/patches/0071-skb-head_frag/wireless.patch index f6999ad5..d14656e7 100644 --- a/patches/0071-skb-head_frag/wireless.patch +++ b/patches/0071-skb-head_frag/wireless.patch @@ -1,6 +1,6 @@ --- a/net/wireless/util.c +++ b/net/wireless/util.c -@@ -661,7 +661,11 @@ void ieee80211_amsdu_to_8023s(struct sk_ +@@ -666,7 +666,11 @@ void ieee80211_amsdu_to_8023s(struct sk_ u8 *payload; int offset = 0, remaining; struct ethhdr eth; diff --git a/patches/0077-genl-ro-after-init/hwsim.patch b/patches/0077-genl-ro-after-init/hwsim.patch index f3f46e5a..22ba14f4 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 -@@ -3790,7 +3790,7 @@ static const struct genl_ops hwsim_ops[] +@@ -3859,7 +3859,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 e4071840..405df6ba 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 -@@ -14768,7 +14768,7 @@ static const struct genl_ops nl80211_ops +@@ -15140,7 +15140,7 @@ static const struct genl_ops nl80211_ops }, }; diff --git a/patches/0079-netdev-destructor/brcmfmac.patch b/patches/0079-netdev-destructor/brcmfmac.patch index 6dc59043..6e67bd4e 100644 --- a/patches/0079-netdev-destructor/brcmfmac.patch +++ b/patches/0079-netdev-destructor/brcmfmac.patch @@ -24,7 +24,7 @@ int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked) { struct brcmf_pub *drvr = ifp->drvr; -@@ -870,7 +887,11 @@ struct brcmf_if *brcmf_add_if(struct brc +@@ -879,7 +896,11 @@ struct brcmf_if *brcmf_add_if(struct brc if (!ndev) return ERR_PTR(-ENOMEM); From patchwork Mon Apr 20 22:16:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499983 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F140D13B2 for ; Mon, 20 Apr 2020 22:16:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DA17020857 for ; Mon, 20 Apr 2020 22:16:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727066AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725774AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 X-Greylist: delayed 104732 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 20 Apr 2020 15:16:33 PDT Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050::465:103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12FBEC061A0C for ; Mon, 20 Apr 2020 15:16:33 -0700 (PDT) Received: from smtp2.mailbox.org (smtp2.mailbox.org [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 mout-p-103.mailbox.org (Postfix) with ESMTPS id 495gyj0MXfzKmYM; Tue, 21 Apr 2020 00:16:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id osG6ScV7yZwz; Tue, 21 Apr 2020 00:16:26 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 2/9] backports: pm_qos: Add cpu_latency_qos_* functions Date: Tue, 21 Apr 2020 00:16:08 +0200 Message-Id: <20200420221615.14734-3-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 478C11742 X-Rspamd-Score: -5.67 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The upstream commit fa048c59bf1b ("PM: QoS: Add CPU latency QoS API wrappers") add the new cpu_latency_qos_* functions. In the initial commit they are just calling the functions from the old API. Use this first step to backport these functions. They are used by the ath10k and ipw2100 driver. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/pm_qos.h | 29 ++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/backport/backport-include/linux/pm_qos.h b/backport/backport-include/linux/pm_qos.h index d5bfc9bc..18cbbace 100644 --- a/backport/backport-include/linux/pm_qos.h +++ b/backport/backport-include/linux/pm_qos.h @@ -13,4 +13,33 @@ #define PM_QOS_DEFAULT_VALUE -1 #endif +#if LINUX_VERSION_IS_LESS(5,7,0) +static inline void cpu_latency_qos_add_request(struct pm_qos_request *req, + s32 value) +{ + pm_qos_add_request(req, PM_QOS_CPU_DMA_LATENCY, value); +} + +static inline void cpu_latency_qos_update_request(struct pm_qos_request *req, + s32 new_value) +{ + pm_qos_update_request(req, new_value); +} + +static inline void cpu_latency_qos_remove_request(struct pm_qos_request *req) +{ + pm_qos_remove_request(req); +} + +static inline bool cpu_latency_qos_request_active(struct pm_qos_request *req) +{ + return pm_qos_request_active(req); +} + +static inline s32 cpu_latency_qos_limit(void) +{ + return pm_qos_request(PM_QOS_CPU_DMA_LATENCY); +} +#endif /* < 5.7 */ + #endif /* _COMPAT_LINUX_PM_QOS_H */ From patchwork Mon Apr 20 22:16:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499979 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3039E14DD for ; Mon, 20 Apr 2020 22:16:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1939B20857 for ; Mon, 20 Apr 2020 22:16:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726262AbgDTWQa (ORCPT ); Mon, 20 Apr 2020 18:16:30 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:34576 "EHLO mout-p-103.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgDTWQa (ORCPT ); Mon, 20 Apr 2020 18:16:30 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [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 mout-p-103.mailbox.org (Postfix) with ESMTPS id 495gyj4THdzKmZB; Tue, 21 Apr 2020 00:16:29 +0200 (CEST) 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 gPcMdLBCTzKt; Tue, 21 Apr 2020 00:16:26 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 3/9] backports: genetlink: Add genlmsg_parse() Date: Tue, 21 Apr 2020 00:16:09 +0200 Message-Id: <20200420221615.14734-4-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: D89EE174A X-Rspamd-Score: -5.67 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org This adds the genlmsg_parse() function to the netlink backport. This was added in upstream commit 8cb081746c03 ("netlink: make validation more configurable for future strictness"). This function is used by the mac80211_hwsim driver. Signed-off-by: Hauke Mehrtens --- backport/backport-include/net/genetlink.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backport/backport-include/net/genetlink.h b/backport/backport-include/net/genetlink.h index 747b6dac..326b9992 100644 --- a/backport/backport-include/net/genetlink.h +++ b/backport/backport-include/net/genetlink.h @@ -249,6 +249,17 @@ static inline struct nlattr **genl_family_attrbuf(struct genl_family *family) return family->attrbuf; } -#endif /* LINUX_VERSION_IS_LESS(4,20,0) */ + +#define genlmsg_parse LINUX_BACKPORT(genlmsg_parse) +static inline int genlmsg_parse(const struct nlmsghdr *nlh, + const struct genl_family *family, + struct nlattr *tb[], int maxtype, + const struct nla_policy *policy, + struct netlink_ext_ack *extack) +{ + return __nlmsg_parse(nlh, family->hdrsize + GENL_HDRLEN, tb, maxtype, + policy, NL_VALIDATE_STRICT, extack); +} +#endif /* LINUX_VERSION_IS_LESS(5,2,0) */ #endif /* __BACKPORT_NET_GENETLINK_H */ From patchwork Mon Apr 20 22:16:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499995 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05AF218EC for ; Mon, 20 Apr 2020 22:16:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC0172078C for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726013AbgDTWQe (ORCPT ); Mon, 20 Apr 2020 18:16:34 -0400 Received: from mout-p-102.mailbox.org ([80.241.56.152]:53742 "EHLO mout-p-102.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726650AbgDTWQe (ORCPT ); Mon, 20 Apr 2020 18:16:34 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [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 mout-p-102.mailbox.org (Postfix) with ESMTPS id 495gyl1n2qzKmSg; Tue, 21 Apr 2020 00:16:31 +0200 (CEST) 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 13XveaIoC89n; Tue, 21 Apr 2020 00:16:28 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 4/9] backports: rculist: Add additional parameter to list_for_each_entry_rcu() Date: Tue, 21 Apr 2020 00:16:10 +0200 Message-Id: <20200420221615.14734-5-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 831DA173E X-Rspamd-Score: -5.43 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Upstream commit 28875945ba98 ("rcu: Add support for consolidated-RCU reader checking") adds a new paramater for lock checking to list_for_each_entry_rcu(). Older kernel versions do not support CONFIG_PROVE_RCU_LIST, just ignore the extra parameter. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/rculist.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/backport/backport-include/linux/rculist.h b/backport/backport-include/linux/rculist.h index 9671e7c4..967cdb86 100644 --- a/backport/backport-include/linux/rculist.h +++ b/backport/backport-include/linux/rculist.h @@ -1,6 +1,7 @@ #ifndef __BACKPORT_RCULIST_H #define __BACKPORT_RCULIST_H #include_next +#include #if LINUX_VERSION_IS_LESS(3,9,0) #include @@ -54,4 +55,25 @@ }) #endif /* list_first_or_null_rcu */ + +#if LINUX_VERSION_IS_LESS(5,4,0) + +/** + * list_for_each_entry_rcu - iterate over rcu list of given type + * @pos: the type * to use as a loop cursor. + * @head: the head for your list. + * @member: the name of the list_head within the struct. + * @cond...: optional lockdep expression if called from non-RCU protection. + * + * This list-traversal primitive may safely run concurrently with + * the _rcu list-mutation primitives such as list_add_rcu() + * as long as the traversal is guarded by rcu_read_lock(). + */ +#undef list_for_each_entry_rcu +#define list_for_each_entry_rcu(pos, head, member, cond...) \ + for (pos = list_entry_rcu((head)->next, typeof(*pos), member); \ + &pos->member != (head); \ + pos = list_entry_rcu(pos->member.next, typeof(*pos), member)) +#endif /* < 5.4 */ + #endif /* __BACKPORT_RCULIST_H */ From patchwork Mon Apr 20 22:16:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499989 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 90BEE17EA for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 833F120857 for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726746AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050::465:103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C38BC061A0F for ; Mon, 20 Apr 2020 15:16:33 -0700 (PDT) Received: from smtp2.mailbox.org (smtp2.mailbox.org [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 mout-p-103.mailbox.org (Postfix) with ESMTPS id 495gyl0Y4xzKmbl; Tue, 21 Apr 2020 00:16:31 +0200 (CEST) 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 gG9YB_fwYxlO; Tue, 21 Apr 2020 00:16:28 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 5/9] backports: Add include/uapi/linux/virtio_ids.h Date: Tue, 21 Apr 2020 00:16:11 +0200 Message-Id: <20200420221615.14734-6-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4567D1731 X-Rspamd-Score: -5.67 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org Add the missing constant VIRTIO_ID_MAC80211_HWSIM. This is a stable user space API, so it should be save to copy this file. Signed-off-by: Hauke Mehrtens --- copy-list | 1 + 1 file changed, 1 insertion(+) diff --git a/copy-list b/copy-list index ba10a0bf..6aeb9cc6 100644 --- a/copy-list +++ b/copy-list @@ -54,6 +54,7 @@ include/linux/platform_data/brcmfmac.h include/linux/platform_data/net-cw1200.h include/uapi/linux/nl80211.h include/net/rsi_91x.h +include/uapi/linux/virtio_ids.h include/net/cfg80211.h include/net/cfg80211-wext.h From patchwork Mon Apr 20 22:16:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499987 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7E50E6CA for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 66B7B2078C for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbgDTWQe (ORCPT ); Mon, 20 Apr 2020 18:16:34 -0400 Received: from mout-p-103.mailbox.org ([80.241.56.161]:34596 "EHLO mout-p-103.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726831AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [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 mout-p-103.mailbox.org (Postfix) with ESMTPS id 495gyl5TzqzKmcK; Tue, 21 Apr 2020 00:16:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id P9ZkOfxgd6aC; Tue, 21 Apr 2020 00:16:28 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 6/9] backports: virtio_config: Add virtio_find_vqs() Date: Tue, 21 Apr 2020 00:16:12 +0200 Message-Id: <20200420221615.14734-7-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 0130B1734 X-Rspamd-Score: -5.43 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The virtio_find_vqs() function is now used by the mac80211_hwsim driver. This is just a wrapper around the find_vqs callback. The find_vqs callback changed over the time. With kernel 4.10 the names parameter was changed from "const char *names[]" to "const char * const names[]". With kernel 4.11 the "struct irq_affinity *desc" was added. We have to define struct irq_affinity here for older kernel versions, because it is used in this new parameter in kernel >= 4.12 this is already done in the upstream header file. Signed-off-by: Hauke Mehrtens --- .../backport-include/linux/virtio_config.h | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 backport/backport-include/linux/virtio_config.h diff --git a/backport/backport-include/linux/virtio_config.h b/backport/backport-include/linux/virtio_config.h new file mode 100644 index 00000000..aeb1ba10 --- /dev/null +++ b/backport/backport-include/linux/virtio_config.h @@ -0,0 +1,31 @@ +#ifndef _COMPAT_LINUX_VIRTIO_CONFIG_H +#define _COMPAT_LINUX_VIRTIO_CONFIG_H +#include_next + +#include + +#if LINUX_VERSION_IS_LESS(4,11,0) +struct irq_affinity; +#endif + +#if LINUX_VERSION_IS_LESS(4,12,0) +static inline +int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs, + struct virtqueue *vqs[], vq_callback_t *callbacks[], +#if LINUX_VERSION_IS_LESS(4,10,0) + const char * const names[], +#else + const char *names[], +#endif + struct irq_affinity *desc) +{ +#if LINUX_VERSION_IS_LESS(4,11,0) + return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names); +#else + return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, desc); +#endif +} +#endif /* < 4.12 */ + + +#endif /* _COMPAT_LINUX_VIRTIO_CONFIG_H */ From patchwork Mon Apr 20 22:16:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499985 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 342721892 for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1CA9F2078C for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725774AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726746AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050::465:103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1398BC061A0E for ; Mon, 20 Apr 2020 15:16:33 -0700 (PDT) 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 mout-p-103.mailbox.org (Postfix) with ESMTPS id 495gyl5FVVzKmc5; Tue, 21 Apr 2020 00:16:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id CjqemNG9Ip0r; Tue, 21 Apr 2020 00:16:29 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 7/9] backports: patches: avoid struct spi_delay usage Date: Tue, 21 Apr 2020 00:16:13 +0200 Message-Id: <20200420221615.14734-8-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: EF7B6168A X-Rspamd-Score: -5.43 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The struct spi_transfer got a new member "struct spi_delay delay" in upstream commit bebcfd272df6 ("spi: introduce `delay` field for `spi_transfer` + spi_transfer_delay_exec()"), use the older interface in older kernel versions. Signed-off-by: Hauke Mehrtens --- patches/0095-spi-delay/libertas.patch | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 patches/0095-spi-delay/libertas.patch diff --git a/patches/0095-spi-delay/libertas.patch b/patches/0095-spi-delay/libertas.patch new file mode 100644 index 00000000..4a4e59a1 --- /dev/null +++ b/patches/0095-spi-delay/libertas.patch @@ -0,0 +1,17 @@ +--- a/drivers/net/wireless/marvell/libertas/if_spi.c ++++ b/drivers/net/wireless/marvell/libertas/if_spi.c +@@ -235,9 +235,14 @@ static int spu_read(struct if_spi_card * + spi_message_add_tail(&dummy_trans, &m); + } else { + /* Busy-wait while the SPU fills the FIFO */ ++#if LINUX_VERSION_IS_GEQ(5,5,0) + reg_trans.delay.value = + DIV_ROUND_UP((100 + (delay * 10)), 1000); + reg_trans.delay.unit = SPI_DELAY_UNIT_USECS; ++#else ++ reg_trans.delay_usecs = ++ DIV_ROUND_UP((100 + (delay * 10)), 1000); ++#endif /* >= 5.5 */ + } + + /* read in data */ From patchwork Mon Apr 20 22:16:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499993 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DCCF114DD for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CDD0D2078C for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727873AbgDTWQe (ORCPT ); Mon, 20 Apr 2020 18:16:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726013AbgDTWQd (ORCPT ); Mon, 20 Apr 2020 18:16:33 -0400 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050::465:202]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6BE63C061A10 for ; Mon, 20 Apr 2020 15:16:33 -0700 (PDT) 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 mout-p-202.mailbox.org (Postfix) with ESMTPS id 495gyl6WtWzQlFr; Tue, 21 Apr 2020 00:16:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id IqLT3mMoJfek; Tue, 21 Apr 2020 00:16:29 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 8/9] backports: patches: Avoid struct ethtool_ops.supported_coalesce_params Date: Tue, 21 Apr 2020 00:16:14 +0200 Message-Id: <20200420221615.14734-9-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2961F1745 X-Rspamd-Score: -5.66 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org The supported_coalesce_params member was added to the struct ethtool_ops in upstream commit 95cddcb5cc20 ("ethtool: add infrastructure for centralized checking of coalescing parameters"). This prevents the usage in kernel < 5.7. Signed-off-by: Hauke Mehrtens --- patches/0096-ethtool-supported_coalesce_params.cocci | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 patches/0096-ethtool-supported_coalesce_params.cocci diff --git a/patches/0096-ethtool-supported_coalesce_params.cocci b/patches/0096-ethtool-supported_coalesce_params.cocci new file mode 100644 index 00000000..9b1b090e --- /dev/null +++ b/patches/0096-ethtool-supported_coalesce_params.cocci @@ -0,0 +1,9 @@ +@r@ +identifier s,expr; +@@ + +struct ethtool_ops s = { ++#if LINUX_VERSION_IS_GEQ(5,7,0) + .supported_coalesce_params = expr, ++#endif +}; From patchwork Mon Apr 20 22:16:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 11499991 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B04C513B2 for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 994E920857 for ; Mon, 20 Apr 2020 22:16:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726831AbgDTWQe (ORCPT ); Mon, 20 Apr 2020 18:16:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727873AbgDTWQe (ORCPT ); Mon, 20 Apr 2020 18:16:34 -0400 Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050::465:101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D392EC061A0C for ; Mon, 20 Apr 2020 15:16:33 -0700 (PDT) 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 mout-p-101.mailbox.org (Postfix) with ESMTPS id 495gym2c6GzKmhy; Tue, 21 Apr 2020 00:16:32 +0200 (CEST) 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 yRXg_7sCBBL8; Tue, 21 Apr 2020 00:16:29 +0200 (CEST) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: johannes@sipsolutions.net, Hauke Mehrtens Subject: [PATCH 9/9] backports: netdevice: Add netif_is_bridge_port() Date: Tue, 21 Apr 2020 00:16:15 +0200 Message-Id: <20200420221615.14734-10-hauke@hauke-m.de> In-Reply-To: <20200420221615.14734-1-hauke@hauke-m.de> References: <20200420221615.14734-1-hauke@hauke-m.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 9C4821750 X-Rspamd-Score: -5.43 / 15.00 / 15.00 Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org netif_is_bridge_port() was added in upstream Linux commit 28f9ee22bcdd ("vlan: Do not put vlan headers back on bridge and macvlan ports"). It is now used by the wireless subsystem. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/netdevice.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h index a71ed590..edb0aaf3 100644 --- a/backport/backport-include/linux/netdevice.h +++ b/backport/backport-include/linux/netdevice.h @@ -380,4 +380,12 @@ static inline int backport_dev_open(struct net_device *dev, struct netlink_ext_a #define dev_open LINUX_BACKPORT(dev_open) #endif +#if LINUX_VERSION_IS_LESS(4,4,0) +#define netif_is_bridge_port LINUX_BACKPORT(netif_is_bridge_port) +static inline bool netif_is_bridge_port(const struct net_device *dev) +{ + return dev->priv_flags & IFF_BRIDGE_PORT; +} +#endif + #endif /* __BACKPORT_NETDEVICE_H */