From f44b26e5dac8bcad59e50b884778e5a51628e655 Mon Sep 17 00:00:00 2001 From: agx Date: Wed, 10 Jan 2007 17:58:34 +0000 Subject: add ethtool_ops.get_link and add ethtool_ to all implemnted ethtool ops (like in the ip2200 driver) --- at76c503.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/at76c503.c b/at76c503.c index 80c0bd9..9a1b1de 100644 --- a/at76c503.c +++ b/at76c503.c @@ -6459,8 +6459,8 @@ static const struct iw_handler_def at76c503_handler_def = }; -static void at76c503_get_drvinfo(struct net_device *netdev, - struct ethtool_drvinfo *info) +static void at76c503_ethtool_get_drvinfo(struct net_device *netdev, + struct ethtool_drvinfo *info) { struct at76c503 *dev = (struct at76c503 *)netdev->priv; @@ -6478,8 +6478,15 @@ static void at76c503_get_drvinfo(struct net_device *netdev, dev->fw_version.patch, dev->fw_version.build); } +static u32 at76c503_ethtool_get_link(struct net_device *netdev) +{ + struct at76c503 *dev = netdev->priv; + return dev->istate == CONNECTED; +} + static struct ethtool_ops at76c503_ethtool_ops = { - .get_drvinfo = at76c503_get_drvinfo, + .get_drvinfo = at76c503_ethtool_get_drvinfo, + .get_link = at76c503_ethtool_get_link, }; -- cgit v1.2.3