|
@@ -296,6 +296,20 @@ err_out:
|
|
return err;
|
|
return err;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/* Ioctl MII Interface */
|
|
|
|
+static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
|
|
|
|
+{
|
|
|
|
+ struct gfar_private *priv = netdev_priv(dev);
|
|
|
|
+
|
|
|
|
+ if (!netif_running(dev))
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
|
|
+ if (!priv->phydev)
|
|
|
|
+ return -ENODEV;
|
|
|
|
+
|
|
|
|
+ return phy_mii_ioctl(priv->phydev, if_mii(rq), cmd);
|
|
|
|
+}
|
|
|
|
+
|
|
/* Set up the ethernet device structure, private data,
|
|
/* Set up the ethernet device structure, private data,
|
|
* and anything else we need before we start */
|
|
* and anything else we need before we start */
|
|
static int gfar_probe(struct of_device *ofdev,
|
|
static int gfar_probe(struct of_device *ofdev,
|
|
@@ -366,6 +380,7 @@ static int gfar_probe(struct of_device *ofdev,
|
|
dev->set_multicast_list = gfar_set_multi;
|
|
dev->set_multicast_list = gfar_set_multi;
|
|
|
|
|
|
dev->ethtool_ops = &gfar_ethtool_ops;
|
|
dev->ethtool_ops = &gfar_ethtool_ops;
|
|
|
|
+ dev->do_ioctl = gfar_ioctl;
|
|
|
|
|
|
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM) {
|
|
if (priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM) {
|
|
priv->rx_csum_enable = 1;
|
|
priv->rx_csum_enable = 1;
|