[PATCH 19/30] patches: handle netdev_walk_all_lower_dev()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The signature of netdev_walk_all_lower_dev() takes a pointer to struct
netdev_nested_priv starting with kernel 5.9. Add a patch to handle both
cases now.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 patches/0098-netdev_nested_priv/qtnfmac.patch | 43 +++++++++++++++++++
 1 file changed, 43 insertions(+)
 create mode 100644 patches/0098-netdev_nested_priv/qtnfmac.patch

diff --git a/patches/0098-netdev_nested_priv/qtnfmac.patch b/patches/0098-netdev_nested_priv/qtnfmac.patch
new file mode 100644
index 00000000..77d07f61
--- /dev/null
+++ b/patches/0098-netdev_nested_priv/qtnfmac.patch
@@ -0,0 +1,43 @@
+--- a/drivers/net/wireless/quantenna/qtnfmac/core.c
++++ b/drivers/net/wireless/quantenna/qtnfmac/core.c
+@@ -671,10 +671,16 @@ bool qtnf_netdev_is_qtn(const struct net
+ 	return ndev->netdev_ops == &qtnf_netdev_ops;
+ }
+ 
++#if LINUX_VERSION_IS_GEQ(5,9,0)
+ static int qtnf_check_br_ports(struct net_device *dev,
+ 			       struct netdev_nested_priv *priv)
+ {
+ 	struct net_device *ndev = (struct net_device *)priv->data;
++#else
++static int qtnf_check_br_ports(struct net_device *dev, void *data)
++{
++	struct net_device *ndev = data;
++#endif
+ 
+ 	if (dev != ndev && netdev_port_same_parent_id(dev, ndev))
+ 		return -ENOTSUPP;
+@@ -687,9 +693,11 @@ static int qtnf_core_netdevice_event(str
+ {
+ 	struct net_device *ndev = netdev_notifier_info_to_dev(ptr);
+ 	const struct netdev_notifier_changeupper_info *info;
++#if LINUX_VERSION_IS_GEQ(5,9,0)
+ 	struct netdev_nested_priv priv = {
+ 		.data = (void *)ndev,
+ 	};
++#endif
+ 	struct net_device *brdev;
+ 	struct qtnf_vif *vif;
+ 	struct qtnf_bus *bus;
+@@ -729,7 +737,11 @@ static int qtnf_core_netdevice_event(str
+ 		} else {
+ 			ret = netdev_walk_all_lower_dev(brdev,
+ 							qtnf_check_br_ports,
++#if LINUX_VERSION_IS_GEQ(5,9,0)
+ 							&priv);
++#else
++							ndev);
++#endif
+ 		}
+ 
+ 		break;
-- 
2.20.1

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux