Skip to content

Commit

Permalink
net: asix: ax88772: add ethtool pause configuration
Browse files Browse the repository at this point in the history
Add phylink based ethtool pause configuration

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Oleksij Rempel authored and David S. Miller committed Aug 26, 2022
1 parent e0bffe3 commit 6661918
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions drivers/net/usb/asix_devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,24 @@ static int ax88772_ethtool_get_sset_count(struct net_device *ndev, int sset)
}
}

static void ax88772_ethtool_get_pauseparam(struct net_device *ndev,
struct ethtool_pauseparam *pause)
{
struct usbnet *dev = netdev_priv(ndev);
struct asix_common_private *priv = dev->driver_priv;

phylink_ethtool_get_pauseparam(priv->phylink, pause);
}

static int ax88772_ethtool_set_pauseparam(struct net_device *ndev,
struct ethtool_pauseparam *pause)
{
struct usbnet *dev = netdev_priv(ndev);
struct asix_common_private *priv = dev->driver_priv;

return phylink_ethtool_set_pauseparam(priv->phylink, pause);
}

static const struct ethtool_ops ax88772_ethtool_ops = {
.get_drvinfo = asix_get_drvinfo,
.get_link = usbnet_get_link,
Expand All @@ -319,6 +337,8 @@ static const struct ethtool_ops ax88772_ethtool_ops = {
.self_test = net_selftest,
.get_strings = ax88772_ethtool_get_strings,
.get_sset_count = ax88772_ethtool_get_sset_count,
.get_pauseparam = ax88772_ethtool_get_pauseparam,
.set_pauseparam = ax88772_ethtool_set_pauseparam,
};

static int ax88772_reset(struct usbnet *dev)
Expand Down

0 comments on commit 6661918

Please sign in to comment.