aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-11-07 15:12:44 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2020-12-05 21:24:52 +0100
commit796bf12326164e0a2b2c7a7f06bf72b169de2dcb (patch)
tree3f34818cd45be5068eb7f0aa2f2c5f93852eeccf
parent15f348f692e3fcd05bc8fcd02c72778735187c63 (diff)
downloadbackports-796bf12326164e0a2b2c7a7f06bf72b169de2dcb.tar.gz
patches: handle netdev_walk_all_lower_dev()
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@hauke-m.de>
-rw-r--r--patches/0098-netdev_nested_priv/qtnfmac.patch43
1 files changed, 43 insertions, 0 deletions
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;