diff options
author | Olaf Hering <olaf@aepfle.de> | 2007-08-25 22:32:59 +0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-11 03:50:54 +0400 |
commit | ced13330bb687780ce1d46f5404521cc0ea40481 (patch) | |
tree | 7591914fee64afb2436c023f29dc753cf19b35c6 /drivers/net/bmac.c | |
parent | 167f53d05fccb47b6eeadac7f6705b3f2f042d03 (diff) | |
download | linux-ced13330bb687780ce1d46f5404521cc0ea40481.tar.xz |
bmac: add simple ethtool support for network manager
NetworkManager will not start dhcpd on an interface unless it reports
link-up state via ethtool.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/bmac.c')
-rw-r--r-- | drivers/net/bmac.c | 13 |
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 @@ #include <linux/spinlock.h> #include <linux/crc32.h> #include <linux/bitrev.h> +#include <linux/ethtool.h> #include <asm/prom.h> #include <asm/dbdma.h> #include <asm/io.h> @@ -1246,6 +1247,17 @@ static void bmac_reset_and_enable(struct net_device *dev) } spin_unlock_irqrestore(&bp->lock, flags); } +static void bmac_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) +{ + struct bmac_data *bp = netdev_priv(dev); + strcpy(info->driver, "bmac"); + strcpy(info->bus_info, bp->mdev->ofdev.dev.bus_id); +} + +static const struct ethtool_ops bmac_ethtool_ops = { + .get_drvinfo = bmac_get_drvinfo, + .get_link = ethtool_op_get_link, +}; static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_id *match) { @@ -1311,6 +1323,7 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i dev->open = bmac_open; dev->stop = bmac_close; + dev->ethtool_ops = &bmac_ethtool_ops; dev->hard_start_xmit = bmac_output; dev->get_stats = bmac_stats; dev->set_multicast_list = bmac_set_multicast; |