]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
Add ethtool -g support to 8139cp
authorRick Jones <rick.jones2@hp.com>
Fri, 7 Oct 2011 06:42:21 +0000 (06:42 +0000)
committerJoe Jin <joe.jin@oracle.com>
Fri, 18 May 2012 02:19:46 +0000 (10:19 +0800)
Add support for reporting ring sizes via ethtool -g to the 8139cp driver.

(cherry picked from commit 1d0861acfb24d0ca0661ff5a156b992b2c589458)
Signed-off-by: Rick Jones <rick.jones2@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/8139cp.c

index 29d3aa37c4b82c75f4c0ecbf2fa68464509605de..4f74de9619be80fcd11dbcc59c18dfb3ece1702d 100644 (file)
@@ -1352,6 +1352,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;
@@ -1548,6 +1557,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)