diff mbox series

[40/47] patches: Adapt signature of ethtool_ops->set_coalesce callback

Message ID 20211019214320.2035704-41-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 5.15-rc6 | expand

Commit Message

Hauke Mehrtens Oct. 19, 2021, 9:43 p.m. UTC
With kernel 5.15 ethtool_ops->set_coalesce and ethtool_ops->get_coalesce
callback function got extra parameters. Add a patch to handle this.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 patches/0103-ethtool-coalesce.patch | 36 +++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
 create mode 100644 patches/0103-ethtool-coalesce.patch
diff mbox series

Patch

diff --git a/patches/0103-ethtool-coalesce.patch b/patches/0103-ethtool-coalesce.patch
new file mode 100644
index 00000000..a41b9c4b
--- /dev/null
+++ b/patches/0103-ethtool-coalesce.patch
@@ -0,0 +1,36 @@ 
+--- a/drivers/net/wireless/ath/wil6210/ethtool.c
++++ b/drivers/net/wireless/ath/wil6210/ethtool.c
+@@ -11,11 +11,16 @@
+ 
+ #include "wil6210.h"
+ 
++#if LINUX_VERSION_IS_GEQ(5,15,0)
+ static int
+ wil_ethtoolops_get_coalesce(struct net_device *ndev,
+ 			    struct ethtool_coalesce *cp,
+ 			    struct kernel_ethtool_coalesce *kernel_coal,
+ 			    struct netlink_ext_ack *extack)
++#else
++static int wil_ethtoolops_get_coalesce(struct net_device *ndev,
++				       struct ethtool_coalesce *cp)
++#endif
+ {
+ 	struct wil6210_priv *wil = ndev_to_wil(ndev);
+ 	u32 tx_itr_en, tx_itr_val = 0;
+@@ -48,11 +53,16 @@ out:
+ 	return ret;
+ }
+ 
++#if LINUX_VERSION_IS_GEQ(5,15,0)
+ static int
+ wil_ethtoolops_set_coalesce(struct net_device *ndev,
+ 			    struct ethtool_coalesce *cp,
+ 			    struct kernel_ethtool_coalesce *kernel_coal,
+ 			    struct netlink_ext_ack *extack)
++#else
++static int wil_ethtoolops_set_coalesce(struct net_device *ndev,
++				       struct ethtool_coalesce *cp)
++#endif
+ {
+ 	struct wil6210_priv *wil = ndev_to_wil(ndev);
+ 	struct wireless_dev *wdev = ndev->ieee80211_ptr;