Skip to content

Commit

Permalink
Add ethtool -g support to 8139cp
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rick Jones authored and David S. Miller committed Oct 7, 2011
1 parent 88c5100 commit 1d0861a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/net/ethernet/realtek/8139cp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 1d0861a

Please sign in to comment.