This patch makes the gianfar ethtool code use phy_ethtool_get_link() instead of
ethtool_op_get_link().

Patch depends on previous one (1/2).

Signed-off-by: Nate Case <[EMAIL PROTECTED]>

---

--- a/drivers/net/gianfar_ethtool.c     2006-06-05 11:27:19.000000000 -0500
+++ b/drivers/net/gianfar_ethtool.c     2006-06-04 19:31:01.000000000 -0500
@@ -228,6 +228,18 @@
                buf[i] = gfar_read(&theregs[i]);
 }
 
+static u32 gfar_get_link(struct net_device *dev)
+{
+       struct gfar_private *priv = netdev_priv(dev);
+       struct phy_device *phydev = priv->phydev;
+
+       if (NULL == phydev)
+               return -ENODEV;
+
+       return phy_ethtool_get_link(phydev);
+}
+
+
 /* Convert microseconds to ethernet clock ticks, which changes
  * depending on what speed the controller is running at */
 static unsigned int gfar_usecs2ticks(struct gfar_private *priv, unsigned int 
usecs)
@@ -574,7 +578,7 @@
        .get_drvinfo = gfar_gdrvinfo,
        .get_regs_len = gfar_reglen,
        .get_regs = gfar_get_regs,
-       .get_link = ethtool_op_get_link,
+       .get_link = gfar_get_link,
        .get_coalesce = gfar_gcoalesce,
        .set_coalesce = gfar_scoalesce,
        .get_ringparam = gfar_gringparam,


-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to