mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 17:42:41 +00:00
55 lines
2.0 KiB
Diff
55 lines
2.0 KiB
Diff
From 146aff9ca0ed8795be76401e67ca21ce1ec01281 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Wed, 4 Aug 2021 08:36:30 +0200
|
|
Subject: [PATCH] netifd: fix compile on older kernels
|
|
|
|
The ethtool features do not exist on ancient qualcomm kernels.
|
|
Disable that feature if running on QCA.
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
.../config/netifd/patches/003-ethtool.patch | 31 +++++++++++++++++++
|
|
1 file changed, 31 insertions(+)
|
|
create mode 100644 package/network/config/netifd/patches/003-ethtool.patch
|
|
|
|
diff --git a/package/network/config/netifd/patches/003-ethtool.patch b/package/network/config/netifd/patches/003-ethtool.patch
|
|
new file mode 100644
|
|
index 0000000000..74164cbe6e
|
|
--- /dev/null
|
|
+++ b/package/network/config/netifd/patches/003-ethtool.patch
|
|
@@ -0,0 +1,31 @@
|
|
+Index: netifd-2023-09-19-8587c074/system-linux.c
|
|
+===================================================================
|
|
+--- netifd-2023-09-19-8587c074.orig/system-linux.c
|
|
++++ netifd-2023-09-19-8587c074/system-linux.c
|
|
+@@ -2010,6 +2010,8 @@ system_set_ethtool_eee_settings(struct d
|
|
+ netifd_log_message(L_WARNING, "cannot set eee %d for device %s", s->eee, dev->ifname);
|
|
+ }
|
|
+
|
|
++#ifdef SPEED_400000
|
|
++// ugly hack to detect if we are running on an ancient kernel
|
|
+ static void
|
|
+ system_set_ethtool_settings(struct device *dev, struct device_settings *s)
|
|
+ {
|
|
+@@ -2087,6 +2089,7 @@ system_set_ethtool_settings(struct devic
|
|
+ ecmd.req.cmd = ETHTOOL_SLINKSETTINGS;
|
|
+ ioctl(sock_ioctl, SIOCETHTOOL, &ifr);
|
|
+ }
|
|
++#endif
|
|
+
|
|
+ static void
|
|
+ system_set_ethtool_settings_after_up(struct device *dev, struct device_settings *s)
|
|
+@@ -2341,7 +2344,9 @@ system_if_apply_settings(struct device *
|
|
+ netifd_log_message(L_WARNING, "%s Your kernel is older than linux 6.1.0, changing DSA port conduit is not supported!", dev->ifname);
|
|
+ #endif
|
|
+ }
|
|
++#ifdef SPEED_400000
|
|
+ system_set_ethtool_settings(dev, s);
|
|
++#endif
|
|
+ }
|
|
+
|
|
+ void system_if_apply_settings_after_up(struct device *dev, struct device_settings *s)
|
|
--
|
|
2.34.1
|
|
|