ipq40xx: net: ethernet: edma: reject unsupported coalescing params
[openwrt/staging/chunkeey.git] / target / linux / ipq40xx / files / drivers / net / ethernet / qualcomm / essedma / edma_ethtool.c
index ac5cb50961e409308e3880efc7fb31979b9abb97..f84cd5aa62238170769d42ce22be67f74d9ee579 100644 (file)
@@ -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,