Commit b4bf4278 authored by François Romieu's avatar François Romieu Committed by Jeff Garzik

[netdrvr r8169] ethtool driver info

Author: Krishnakumar R. <krishnakumar@naturesoft.net>
parent 5097bc46
...@@ -40,6 +40,7 @@ VERSION 1.2 <2002/11/30> ...@@ -40,6 +40,7 @@ VERSION 1.2 <2002/11/30>
#include <linux/netdevice.h> #include <linux/netdevice.h>
#include <linux/etherdevice.h> #include <linux/etherdevice.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/ethtool.h>
#include <linux/crc32.h> #include <linux/crc32.h>
#include <linux/init.h> #include <linux/init.h>
...@@ -382,6 +383,20 @@ mdio_read(void *ioaddr, int RegAddr) ...@@ -382,6 +383,20 @@ mdio_read(void *ioaddr, int RegAddr)
return value; return value;
} }
static void rtl8169_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info)
{
struct rtl8169_private *tp = dev->priv;
strcpy(info->driver, RTL8169_DRIVER_NAME);
strcpy(info->version, RTL8169_VERSION );
strcpy(info->bus_info, pci_name(tp->pci_dev));
}
static struct ethtool_ops rtl8169_ethtool_ops = {
.get_drvinfo = rtl8169_get_drvinfo,
};
static void rtl8169_write_gmii_reg_bit(void *ioaddr, int reg, int bitnum, static void rtl8169_write_gmii_reg_bit(void *ioaddr, int reg, int bitnum,
int bitval) int bitval)
{ {
...@@ -793,6 +808,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -793,6 +808,7 @@ rtl8169_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->open = rtl8169_open; dev->open = rtl8169_open;
dev->hard_start_xmit = rtl8169_start_xmit; dev->hard_start_xmit = rtl8169_start_xmit;
dev->get_stats = rtl8169_get_stats; dev->get_stats = rtl8169_get_stats;
dev->ethtool_ops = &rtl8169_ethtool_ops;
dev->stop = rtl8169_close; dev->stop = rtl8169_close;
dev->tx_timeout = rtl8169_tx_timeout; dev->tx_timeout = rtl8169_tx_timeout;
dev->set_multicast_list = rtl8169_set_rx_mode; dev->set_multicast_list = rtl8169_set_rx_mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment