You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openwrt/target/linux/layerscape/patches-5.4/701-net-0159-staging-fsl-dp...

56 lines
1.9 KiB
Diff

From f964e8840c12e0659c4cfe7aa7d66b310e09ca51 Mon Sep 17 00:00:00 2001
From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
Date: Tue, 22 Aug 2017 15:00:29 +0300
Subject: [PATCH] staging: fsl-dpaa2/mac: Update ethtool ops
Ethtool ops get/set_settings() are deprecated, so implement
get/set_link_ksettings() instead.
These now call the corresponding phy_ethtool_ksettings_*
generic functions, as the old ones also got deprecated
and removed from the kernel entirely.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
---
drivers/staging/fsl-dpaa2/mac/mac.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
--- a/drivers/staging/fsl-dpaa2/mac/mac.c
+++ b/drivers/staging/fsl-dpaa2/mac/mac.c
@@ -152,16 +152,18 @@ done:
return 0;
}
-static int dpaa2_mac_get_settings(struct net_device *netdev,
- struct ethtool_cmd *cmd)
+static int dpaa2_mac_get_link_ksettings(struct net_device *netdev,
+ struct ethtool_link_ksettings *ks)
{
- return phy_ethtool_gset(netdev->phydev, cmd);
+ phy_ethtool_ksettings_get(netdev->phydev, ks);
+
+ return 0;
}
-static int dpaa2_mac_set_settings(struct net_device *netdev,
- struct ethtool_cmd *cmd)
+static int dpaa2_mac_set_link_ksettings(struct net_device *netdev,
+ const struct ethtool_link_ksettings *ks)
{
- return phy_ethtool_sset(netdev->phydev, cmd);
+ return phy_ethtool_ksettings_set(netdev->phydev, ks);
}
static void dpaa2_mac_get_stats(struct net_device *netdev,
@@ -319,8 +321,8 @@ static const struct net_device_ops dpaa2
};
static const struct ethtool_ops dpaa2_mac_ethtool_ops = {
- .get_settings = &dpaa2_mac_get_settings,
- .set_settings = &dpaa2_mac_set_settings,
+ .get_link_ksettings = &dpaa2_mac_get_link_ksettings,
+ .set_link_ksettings = &dpaa2_mac_set_link_ksettings,
.get_strings = &dpaa2_mac_get_strings,
.get_ethtool_stats = &dpaa2_mac_get_ethtool_stats,
.get_sset_count = &dpaa2_mac_get_sset_count,