Skip to content

Commit

Permalink
r8169: add support for ethtool get_ringparam
Browse files Browse the repository at this point in the history
Add support for the ethtool get_ringparam operation.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Mar 21, 2021
1 parent e0e7af0 commit dc4aa50
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1901,6 +1901,15 @@ static int rtl8169_set_eee(struct net_device *dev, struct ethtool_eee *data)
return ret;
}

static void rtl8169_get_ringparam(struct net_device *dev,
struct ethtool_ringparam *data)
{
data->rx_max_pending = NUM_RX_DESC;
data->rx_pending = NUM_RX_DESC;
data->tx_max_pending = NUM_TX_DESC;
data->tx_pending = NUM_TX_DESC;
}

static const struct ethtool_ops rtl8169_ethtool_ops = {
.supported_coalesce_params = ETHTOOL_COALESCE_USECS |
ETHTOOL_COALESCE_MAX_FRAMES,
Expand All @@ -1921,6 +1930,7 @@ static const struct ethtool_ops rtl8169_ethtool_ops = {
.set_eee = rtl8169_set_eee,
.get_link_ksettings = phy_ethtool_get_link_ksettings,
.set_link_ksettings = phy_ethtool_set_link_ksettings,
.get_ringparam = rtl8169_get_ringparam,
};

static void rtl_enable_eee(struct rtl8169_private *tp)
Expand Down

0 comments on commit dc4aa50

Please sign in to comment.