aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bmac.c')
-rw-r--r--drivers/net/bmac.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index 9b8d7d9dbe86..1eb95b603004 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -19,6 +19,7 @@
19#include <linux/spinlock.h> 19#include <linux/spinlock.h>
20#include <linux/crc32.h> 20#include <linux/crc32.h>
21#include <linux/bitrev.h> 21#include <linux/bitrev.h>
22#include <linux/ethtool.h>
22#include <asm/prom.h> 23#include <asm/prom.h>
23#include <asm/dbdma.h> 24#include <asm/dbdma.h>
24#include <asm/io.h> 25#include <asm/io.h>
@@ -1246,6 +1247,17 @@ static void bmac_reset_and_enable(struct net_device *dev)
1246 } 1247 }
1247 spin_unlock_irqrestore(&bp->lock, flags); 1248 spin_unlock_irqrestore(&bp->lock, flags);
1248} 1249}
1250static void bmac_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
1251{
1252 struct bmac_data *bp = netdev_priv(dev);
1253 strcpy(info->driver, "bmac");
1254 strcpy(info->bus_info, bp->mdev->ofdev.dev.bus_id);
1255}
1256
1257static const struct ethtool_ops bmac_ethtool_ops = {
1258 .get_drvinfo = bmac_get_drvinfo,
1259 .get_link = ethtool_op_get_link,
1260};
1249 1261
1250static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match) 1262static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match)
1251{ 1263{
@@ -1311,6 +1323,7 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
1311 1323
1312 dev->open = bmac_open; 1324 dev->open = bmac_open;
1313 dev->stop = bmac_close; 1325 dev->stop = bmac_close;
1326 dev->ethtool_ops = &bmac_ethtool_ops;
1314 dev->hard_start_xmit = bmac_output; 1327 dev->hard_start_xmit = bmac_output;
1315 dev->get_stats = bmac_stats; 1328 dev->get_stats = bmac_stats;
1316 dev->set_multicast_list = bmac_set_multicast; 1329 dev->set_multicast_list = bmac_set_multicast;