aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq40xx
diff options
context:
space:
mode:
authorRobert Marko <robert.marko@sartura.hr>2021-09-12 23:26:59 +0200
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-09-25 19:28:54 +0200
commitccf214a408592f1783be6e20175105c64b5ddb81 (patch)
tree6b19326f1d309f2337d9ba9f7f1c5eb375fc1724 /target/linux/ipq40xx
parent603848cad86538061c245004a39e0d5c77cc05d2 (diff)
downloadupstream-ccf214a408592f1783be6e20175105c64b5ddb81.tar.gz
upstream-ccf214a408592f1783be6e20175105c64b5ddb81.tar.bz2
upstream-ccf214a408592f1783be6e20175105c64b5ddb81.zip
ipq40xx: net: ethernet: edma: reject unsupported coalescing params
Set ethtool_ops->supported_coalesce_params to let the core reject unsupported coalescing parameters. This driver did not previously reject unsupported parameters. This is a required ethtool op since kernel 5.7. Signed-off-by: Robert Marko <robert.marko@sartura.hr>
Diffstat (limited to 'target/linux/ipq40xx')
-rw-r--r--target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_ethtool.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_ethtool.c b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_ethtool.c
index ac5cb50961..f84cd5aa62 100644
--- a/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_ethtool.c
+++ b/target/linux/ipq40xx/files/drivers/net/ethernet/qualcomm/essedma/edma_ethtool.c
@@ -16,6 +16,7 @@
#include <linux/ethtool.h>
#include <linux/netdevice.h>
#include <linux/string.h>
+#include <linux/version.h>
#include "edma.h"
struct edma_ethtool_stats {
@@ -308,6 +309,9 @@ static void edma_get_ringparam(struct net_device *netdev,
/* Ethtool operations
*/
static const struct ethtool_ops edma_ethtool_ops = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,7,0)
+ .supported_coalesce_params = ETHTOOL_COALESCE_USECS,
+#endif
.get_drvinfo = &edma_get_drvinfo,
.get_link = &ethtool_op_get_link,
.get_msglevel = &edma_get_msglevel,