ipq40xx: refresh ess driver and phy with new api
[openwrt/staging/mkresin.git] / target / linux / ipq40xx / files / drivers / net / ethernet / qualcomm / essedma / edma_ethtool.c
index f84cd5aa62238170769d42ce22be67f74d9ee579..65706cfae12ae80d25c733d8acfc0cce0123f640 100644 (file)
@@ -244,8 +244,14 @@ static int edma_set_settings(struct net_device *netdev,
 /* edma_get_coalesce
  *     get interrupt mitigation
  */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+static int edma_get_coalesce(struct net_device *dev, struct ethtool_coalesce *ec,
+                            struct kernel_ethtool_coalesce *kernel_coal,
+                            struct netlink_ext_ack *extack)
+#else
 static int edma_get_coalesce(struct net_device *netdev,
                             struct ethtool_coalesce *ec)
+#endif
 {
        u32 reg_val;
 
@@ -266,8 +272,14 @@ static int edma_get_coalesce(struct net_device *netdev,
 /* edma_set_coalesce
  *     set interrupt mitigation
  */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0)
+static int edma_set_coalesce(struct net_device *dev, struct ethtool_coalesce *ec,
+                            struct kernel_ethtool_coalesce *kernel_coal,
+                            struct netlink_ext_ack *extack)
+#else
 static int edma_set_coalesce(struct net_device *netdev,
                             struct ethtool_coalesce *ec)
+#endif
 {
        if (ec->tx_coalesce_usecs)
                edma_change_tx_coalesce(ec->tx_coalesce_usecs);