aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/gianfar.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 1b8deca8b9f8..efcbeb6c8673 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -296,6 +296,20 @@ err_out:
296 return err; 296 return err;
297} 297}
298 298
299/* Ioctl MII Interface */
300static int gfar_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
301{
302 struct gfar_private *priv = netdev_priv(dev);
303
304 if (!netif_running(dev))
305 return -EINVAL;
306
307 if (!priv->phydev)
308 return -ENODEV;
309
310 return phy_mii_ioctl(priv->phydev, if_mii(rq), cmd);
311}
312
299/* Set up the ethernet device structure, private data, 313/* Set up the ethernet device structure, private data,
300 * and anything else we need before we start */ 314 * and anything else we need before we start */
301static int gfar_probe(struct of_device *ofdev, 315static int gfar_probe(struct of_device *ofdev,
@@ -366,6 +380,7 @@ static int gfar_probe(struct of_device *ofdev,
366 dev->set_multicast_list = gfar_set_multi; 380 dev->set_multicast_list = gfar_set_multi;
367 381
368 dev->ethtool_ops = &gfar_ethtool_ops; 382 dev->ethtool_ops = &gfar_ethtool_ops;
383 dev->do_ioctl = gfar_ioctl;
369 384
370 if (priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM) { 385 if (priv->device_flags & FSL_GIANFAR_DEV_HAS_CSUM) {
371 priv->rx_csum_enable = 1; 386 priv->rx_csum_enable = 1;