All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: johannes@sipsolutions.net
Cc: backports@vger.kernel.org, Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 2/8] patches: brcmfmac: Fix netdev_set_priv_destructor
Date: Mon, 11 Sep 2017 00:10:14 +0200	[thread overview]
Message-ID: <20170910221020.13067-3-hauke@hauke-m.de> (raw)
In-Reply-To: <20170910221020.13067-1-hauke@hauke-m.de>

On kernel > 4.11.9 the new member priv_destructor should be set in
netdev_set_priv_destructor() and not the old destructor member any more,
it was removed.

This fixes the build on >= 4.11.9.

Fixes: 7c827d5ac9c1 ("patches: brcmfmac: fix netdev destructor")
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/netdevice.h   |  3 +--
 patches/0079-netdev-destructor/brcmfmac.patch | 13 ++++++++-----
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 112bcf2b..9c912285 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -320,8 +320,7 @@ static inline void netif_trans_update(struct net_device *dev)
 }
 #endif
 
-#if LINUX_VERSION_IS_LESS(4,12,0) &&		\
-	!LINUX_VERSION_IN_RANGE(4,11,9, 4,12,0)
+#if LINUX_VERSION_IS_LESS(4,11,9)
 #define netdev_set_priv_destructor(_dev, _destructor) \
 	(_dev)->destructor = __ ## _destructor
 #define netdev_set_def_destructor(_dev) \
diff --git a/patches/0079-netdev-destructor/brcmfmac.patch b/patches/0079-netdev-destructor/brcmfmac.patch
index 3f328b26..6dae7a7a 100644
--- a/patches/0079-netdev-destructor/brcmfmac.patch
+++ b/patches/0079-netdev-destructor/brcmfmac.patch
@@ -1,14 +1,17 @@
-diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
-index b5a561b..6f5466f 100644
 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
-@@ -462,6 +462,18 @@ static const struct net_device_ops brcmf_netdev_ops_pri = {
+@@ -462,6 +462,23 @@ static const struct net_device_ops brcmf
  	.ndo_set_rx_mode = brcmf_netdev_set_multicast_list
  };
  
 +#undef netdev_set_priv_destructor
++#if LINUX_VERSION_IS_LESS(4,11,9)
 +#define netdev_set_priv_destructor(_dev, _destructor) \
-+	(_dev)->destructor = _destructor
++	(_dev)->destructor = (_destructor)
++#else
++#define netdev_set_priv_destructor(_dev, _destructor) \
++	(_dev)->priv_destructor = (_destructor)
++#endif
 +
 +#if LINUX_VERSION_IS_LESS(4,12,0)
 +static void __brcmf_cfg80211_free_netdev(struct net_device *ndev)
@@ -21,7 +24,7 @@ index b5a561b..6f5466f 100644
  int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked)
  {
  	struct brcmf_pub *drvr = ifp->drvr;
-@@ -634,7 +646,11 @@ struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
+@@ -634,7 +651,11 @@ struct brcmf_if *brcmf_add_if(struct brc
  		if (!ndev)
  			return ERR_PTR(-ENOMEM);
  
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply	other threads:[~2017-09-10 22:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-10 22:10 [PATCH 0/8] backports: misc fixes Hauke Mehrtens
2017-09-10 22:10 ` [PATCH 1/8] patches: export bp_usbnet_get_stats64() only if function is added Hauke Mehrtens
2017-09-10 22:10 ` Hauke Mehrtens [this message]
2017-09-10 22:10 ` [PATCH 3/8] backport: add ethtool_convert_legacy_u32_to_link_mode() Hauke Mehrtens
2017-09-10 22:10 ` [PATCH 4/8] header: add IOMEM_ERR_PTR() Hauke Mehrtens
2017-09-10 22:10 ` [PATCH 5/8] header: add __get_dynamic_array_len Hauke Mehrtens
2017-09-10 22:10 ` [PATCH 6/8] header: add pm_system_wakeup() Hauke Mehrtens
2017-09-12  9:35   ` Johannes Berg
2017-09-12 21:39     ` Hauke Mehrtens
2017-09-15  7:32       ` Johannes Berg
2017-09-10 22:10 ` [PATCH 7/8] dependencies: make NFC_TRF7970A depend on kernel > 3.17 Hauke Mehrtens
2017-09-10 22:10 ` [PATCH 8/8] dependencies: make MWIFIEX_PCIE depend on kernel > 3.16 Hauke Mehrtens
2017-09-11 14:48 ` [PATCH 0/8] backports: misc fixes Johannes Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170910221020.13067-3-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@vger.kernel.org \
    --cc=johannes@sipsolutions.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.