aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/realtek/8139cp.c
diff options
context:
space:
mode:
authorRick Jones <rick.jones2@hp.com>2011-10-07 06:42:21 +0000
committerDavid S. Miller <davem@davemloft.net>2011-10-07 16:22:44 -0400
commit1d0861acfb24d0ca0661ff5a156b992b2c589458 (patch)
tree6303a2def462c0725970671e34a64d9d67b59d1b /drivers/net/ethernet/realtek/8139cp.c
parent88c5100c28b02c4b2b2c6f6fafbbd76d90f698b9 (diff)
downloadvexpress-lsk-1d0861acfb24d0ca0661ff5a156b992b2c589458.tar.gz
Add ethtool -g support to 8139cp
Add support for reporting ring sizes via ethtool -g to the 8139cp driver. Signed-off-by: Rick Jones <rick.jones2@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek/8139cp.c')
-rw-r--r--drivers/net/ethernet/realtek/8139cp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/realtek/8139cp.c b/drivers/net/ethernet/realtek/8139cp.c
index c77d5af676a..5dcd5be03f3 100644
--- a/drivers/net/ethernet/realtek/8139cp.c
+++ b/drivers/net/ethernet/realtek/8139cp.c
@@ -1324,6 +1324,15 @@ static void cp_get_drvinfo (struct net_device *dev, struct ethtool_drvinfo *info
strcpy (info->bus_info, pci_name(cp->pdev));
}
+static void cp_get_ringparam(struct net_device *dev,
+ struct ethtool_ringparam *ring)
+{
+ ring->rx_max_pending = CP_RX_RING_SIZE;
+ ring->tx_max_pending = CP_TX_RING_SIZE;
+ ring->rx_pending = CP_RX_RING_SIZE;
+ ring->tx_pending = CP_TX_RING_SIZE;
+}
+
static int cp_get_regs_len(struct net_device *dev)
{
return CP_REGS_SIZE;
@@ -1525,6 +1534,7 @@ static const struct ethtool_ops cp_ethtool_ops = {
.get_eeprom_len = cp_get_eeprom_len,
.get_eeprom = cp_get_eeprom,
.set_eeprom = cp_set_eeprom,
+ .get_ringparam = cp_get_ringparam,
};
static int cp_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)