diff options
author | Ben Hutchings <bhutchings@solarflare.com> | 2010-08-17 05:31:15 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-17 05:31:15 -0400 |
commit | 01414802054c382072b6cb9a1bdc6e243c74b2d5 (patch) | |
tree | f09b05eb9fff16a69d83ec28653992d1bae8d74c /drivers/net/pcmcia/axnet_cs.c | |
parent | bb8a10bbd10a45db0eb45bac520489bdbc0917ef (diff) |
ethtool: Provide a default implementation of ethtool_ops::get_drvinfo
The driver name and bus address for a net_device can normally be found
through the driver model now. Instead of requiring drivers to provide
this information redundantly through the ethtool_ops::get_drvinfo
operation, use the driver model to do so if the driver does not define
the operation. Since ETHTOOL_GDRVINFO no longer requires the driver
to implement any operations, do not require net_device::ethtool_ops to
be set either.
Remove implementations of get_drvinfo and ethtool_ops that provide
only this information.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/pcmcia/axnet_cs.c')
-rw-r--r-- | drivers/net/pcmcia/axnet_cs.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 5f05ffb240cc..a6e37b29e3bf 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -32,7 +32,6 @@ | |||
32 | #include <linux/timer.h> | 32 | #include <linux/timer.h> |
33 | #include <linux/delay.h> | 33 | #include <linux/delay.h> |
34 | #include <linux/spinlock.h> | 34 | #include <linux/spinlock.h> |
35 | #include <linux/ethtool.h> | ||
36 | #include <linux/netdevice.h> | 35 | #include <linux/netdevice.h> |
37 | #include <linux/etherdevice.h> | 36 | #include <linux/etherdevice.h> |
38 | #include <linux/crc32.h> | 37 | #include <linux/crc32.h> |
@@ -86,7 +85,6 @@ static netdev_tx_t axnet_start_xmit(struct sk_buff *skb, | |||
86 | static struct net_device_stats *get_stats(struct net_device *dev); | 85 | static struct net_device_stats *get_stats(struct net_device *dev); |
87 | static void set_multicast_list(struct net_device *dev); | 86 | static void set_multicast_list(struct net_device *dev); |
88 | static void axnet_tx_timeout(struct net_device *dev); | 87 | static void axnet_tx_timeout(struct net_device *dev); |
89 | static const struct ethtool_ops netdev_ethtool_ops; | ||
90 | static irqreturn_t ei_irq_wrapper(int irq, void *dev_id); | 88 | static irqreturn_t ei_irq_wrapper(int irq, void *dev_id); |
91 | static void ei_watchdog(u_long arg); | 89 | static void ei_watchdog(u_long arg); |
92 | static void axnet_reset_8390(struct net_device *dev); | 90 | static void axnet_reset_8390(struct net_device *dev); |
@@ -171,7 +169,6 @@ static int axnet_probe(struct pcmcia_device *link) | |||
171 | 169 | ||
172 | dev->netdev_ops = &axnet_netdev_ops; | 170 | dev->netdev_ops = &axnet_netdev_ops; |
173 | 171 | ||
174 | SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops); | ||
175 | dev->watchdog_timeo = TX_TIMEOUT; | 172 | dev->watchdog_timeo = TX_TIMEOUT; |
176 | 173 | ||
177 | return axnet_config(link); | 174 | return axnet_config(link); |
@@ -658,16 +655,6 @@ reschedule: | |||
658 | add_timer(&info->watchdog); | 655 | add_timer(&info->watchdog); |
659 | } | 656 | } |
660 | 657 | ||
661 | static void netdev_get_drvinfo(struct net_device *dev, | ||
662 | struct ethtool_drvinfo *info) | ||
663 | { | ||
664 | strcpy(info->driver, "axnet_cs"); | ||
665 | } | ||
666 | |||
667 | static const struct ethtool_ops netdev_ethtool_ops = { | ||
668 | .get_drvinfo = netdev_get_drvinfo, | ||
669 | }; | ||
670 | |||
671 | /*====================================================================*/ | 658 | /*====================================================================*/ |
672 | 659 | ||
673 | static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | 660 | static int axnet_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) |