ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 701-net-0159-staging-fsl-dpaa2-mac-Update-ethtool-ops.patch
1 From f964e8840c12e0659c4cfe7aa7d66b310e09ca51 Mon Sep 17 00:00:00 2001
2 From: Ioana Radulescu <ruxandra.radulescu@nxp.com>
3 Date: Tue, 22 Aug 2017 15:00:29 +0300
4 Subject: [PATCH] staging: fsl-dpaa2/mac: Update ethtool ops
5
6 Ethtool ops get/set_settings() are deprecated, so implement
7 get/set_link_ksettings() instead.
8
9 These now call the corresponding phy_ethtool_ksettings_*
10 generic functions, as the old ones also got deprecated
11 and removed from the kernel entirely.
12
13 Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
14 ---
15  drivers/staging/fsl-dpaa2/mac/mac.c | 18 ++++++++++--------
16  1 file changed, 10 insertions(+), 8 deletions(-)
17
18 --- a/drivers/staging/fsl-dpaa2/mac/mac.c
19 +++ b/drivers/staging/fsl-dpaa2/mac/mac.c
20 @@ -152,16 +152,18 @@ done:
21         return 0;
22  }
23  
24 -static int dpaa2_mac_get_settings(struct net_device *netdev,
25 -                                 struct ethtool_cmd *cmd)
26 +static int dpaa2_mac_get_link_ksettings(struct net_device *netdev,
27 +                                       struct ethtool_link_ksettings *ks)
28  {
29 -       return phy_ethtool_gset(netdev->phydev, cmd);
30 +       phy_ethtool_ksettings_get(netdev->phydev, ks);
31 +
32 +       return 0;
33  }
34  
35 -static int dpaa2_mac_set_settings(struct net_device *netdev,
36 -                                 struct ethtool_cmd *cmd)
37 +static int dpaa2_mac_set_link_ksettings(struct net_device *netdev,
38 +                                       const struct ethtool_link_ksettings *ks)
39  {
40 -       return phy_ethtool_sset(netdev->phydev, cmd);
41 +       return phy_ethtool_ksettings_set(netdev->phydev, ks);
42  }
43  
44  static void dpaa2_mac_get_stats(struct net_device *netdev,
45 @@ -319,8 +321,8 @@ static const struct net_device_ops dpaa2
46  };
47  
48  static const struct ethtool_ops dpaa2_mac_ethtool_ops = {
49 -       .get_settings           = &dpaa2_mac_get_settings,
50 -       .set_settings           = &dpaa2_mac_set_settings,
51 +       .get_link_ksettings     = &dpaa2_mac_get_link_ksettings,
52 +       .set_link_ksettings     = &dpaa2_mac_set_link_ksettings,
53         .get_strings            = &dpaa2_mac_get_strings,
54         .get_ethtool_stats      = &dpaa2_mac_get_ethtool_stats,
55         .get_sset_count         = &dpaa2_mac_get_sset_count,