aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/pcnet_cs.c
diff options
context:
space:
mode:
authorBen Hutchings <bhutchings@solarflare.com>2010-08-17 05:31:15 -0400
committerDavid S. Miller <davem@davemloft.net>2010-08-17 05:31:15 -0400
commit01414802054c382072b6cb9a1bdc6e243c74b2d5 (patch)
treef09b05eb9fff16a69d83ec28653992d1bae8d74c /drivers/net/pcmcia/pcnet_cs.c
parentbb8a10bbd10a45db0eb45bac520489bdbc0917ef (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/pcnet_cs.c')
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index c3edfe4c2651..2e1348c0033e 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -35,7 +35,6 @@
35#include <linux/string.h> 35#include <linux/string.h>
36#include <linux/timer.h> 36#include <linux/timer.h>
37#include <linux/delay.h> 37#include <linux/delay.h>
38#include <linux/ethtool.h>
39#include <linux/netdevice.h> 38#include <linux/netdevice.h>
40#include <linux/log2.h> 39#include <linux/log2.h>
41#include <linux/etherdevice.h> 40#include <linux/etherdevice.h>
@@ -100,7 +99,6 @@ static void pcnet_release(struct pcmcia_device *link);
100static int pcnet_open(struct net_device *dev); 99static int pcnet_open(struct net_device *dev);
101static int pcnet_close(struct net_device *dev); 100static int pcnet_close(struct net_device *dev);
102static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); 101static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
103static const struct ethtool_ops netdev_ethtool_ops;
104static irqreturn_t ei_irq_wrapper(int irq, void *dev_id); 102static irqreturn_t ei_irq_wrapper(int irq, void *dev_id);
105static void ei_watchdog(u_long arg); 103static void ei_watchdog(u_long arg);
106static void pcnet_reset_8390(struct net_device *dev); 104static void pcnet_reset_8390(struct net_device *dev);
@@ -628,8 +626,6 @@ static int pcnet_config(struct pcmcia_device *link)
628 ei_status.word16 = 1; 626 ei_status.word16 = 1;
629 ei_status.reset_8390 = &pcnet_reset_8390; 627 ei_status.reset_8390 = &pcnet_reset_8390;
630 628
631 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
632
633 if (info->flags & (IS_DL10019|IS_DL10022)) 629 if (info->flags & (IS_DL10019|IS_DL10022))
634 mii_phy_probe(dev); 630 mii_phy_probe(dev);
635 631
@@ -1143,18 +1139,6 @@ reschedule:
1143 1139
1144/*====================================================================*/ 1140/*====================================================================*/
1145 1141
1146static void netdev_get_drvinfo(struct net_device *dev,
1147 struct ethtool_drvinfo *info)
1148{
1149 strcpy(info->driver, "pcnet_cs");
1150}
1151
1152static const struct ethtool_ops netdev_ethtool_ops = {
1153 .get_drvinfo = netdev_get_drvinfo,
1154};
1155
1156/*====================================================================*/
1157
1158 1142
1159static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) 1143static int ei_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
1160{ 1144{