aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tulip
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/tulip
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/tulip')
-rw-r--r--drivers/net/tulip/xircom_cb.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/net/tulip/xircom_cb.c b/drivers/net/tulip/xircom_cb.c
index a439e93be22d..5a73752be2ca 100644
--- a/drivers/net/tulip/xircom_cb.c
+++ b/drivers/net/tulip/xircom_cb.c
@@ -29,7 +29,6 @@
29#include <linux/skbuff.h> 29#include <linux/skbuff.h>
30#include <linux/delay.h> 30#include <linux/delay.h>
31#include <linux/init.h> 31#include <linux/init.h>
32#include <linux/ethtool.h>
33#include <linux/bitops.h> 32#include <linux/bitops.h>
34 33
35#include <asm/uaccess.h> 34#include <asm/uaccess.h>
@@ -181,19 +180,6 @@ static void print_binary(unsigned int number)
181} 180}
182#endif 181#endif
183 182
184static void netdev_get_drvinfo(struct net_device *dev,
185 struct ethtool_drvinfo *info)
186{
187 struct xircom_private *private = netdev_priv(dev);
188
189 strcpy(info->driver, "xircom_cb");
190 strcpy(info->bus_info, pci_name(private->pdev));
191}
192
193static const struct ethtool_ops netdev_ethtool_ops = {
194 .get_drvinfo = netdev_get_drvinfo,
195};
196
197static const struct net_device_ops netdev_ops = { 183static const struct net_device_ops netdev_ops = {
198 .ndo_open = xircom_open, 184 .ndo_open = xircom_open,
199 .ndo_stop = xircom_close, 185 .ndo_stop = xircom_close,
@@ -279,7 +265,6 @@ static int __devinit xircom_probe(struct pci_dev *pdev, const struct pci_device_
279 setup_descriptors(private); 265 setup_descriptors(private);
280 266
281 dev->netdev_ops = &netdev_ops; 267 dev->netdev_ops = &netdev_ops;
282 SET_ETHTOOL_OPS(dev, &netdev_ethtool_ops);
283 pci_set_drvdata(pdev, dev); 268 pci_set_drvdata(pdev, dev);
284 269
285 if (register_netdev(dev)) { 270 if (register_netdev(dev)) {