aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-02-04 19:02:21 -0500
committerJeff Garzik <jeff@garzik.org>2008-02-11 11:06:36 -0500
commitf42d8aeaf9a32ec130bc99f2e4ba84cafb028244 (patch)
tree62e9907a1dfeaf45a0eefc307e1928b51e001099 /drivers/net
parentbb44fb70e069412c08e07f494b6b4e985f6331ac (diff)
DM9000: Add support for MII ioctl() calls
Add entry to handle the MII ioctl() calls via the generic_mii_ioctl call. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/dm9000.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index afd2cf509073..e52078badaaa 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -142,6 +142,7 @@ static int dm9000_probe(struct platform_device *);
142static int dm9000_open(struct net_device *); 142static int dm9000_open(struct net_device *);
143static int dm9000_start_xmit(struct sk_buff *, struct net_device *); 143static int dm9000_start_xmit(struct sk_buff *, struct net_device *);
144static int dm9000_stop(struct net_device *); 144static int dm9000_stop(struct net_device *);
145static int dm9000_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
145 146
146static void dm9000_init_dm9000(struct net_device *); 147static void dm9000_init_dm9000(struct net_device *);
147 148
@@ -332,6 +333,16 @@ static void dm9000_poll_controller(struct net_device *dev)
332} 333}
333#endif 334#endif
334 335
336static int dm9000_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
337{
338 board_info_t *dm = to_dm9000_board(dev);
339
340 if (!netif_running(dev))
341 return -EINVAL;
342
343 return generic_mii_ioctl(&dm->mii, if_mii(req), cmd, NULL);
344}
345
335/* ethtool ops */ 346/* ethtool ops */
336 347
337static void dm9000_get_drvinfo(struct net_device *dev, 348static void dm9000_get_drvinfo(struct net_device *dev,
@@ -661,6 +672,7 @@ dm9000_probe(struct platform_device *pdev)
661 ndev->stop = &dm9000_stop; 672 ndev->stop = &dm9000_stop;
662 ndev->set_multicast_list = &dm9000_hash_table; 673 ndev->set_multicast_list = &dm9000_hash_table;
663 ndev->ethtool_ops = &dm9000_ethtool_ops; 674 ndev->ethtool_ops = &dm9000_ethtool_ops;
675 ndev->do_ioctl = &dm9000_ioctl;
664 676
665#ifdef CONFIG_NET_POLL_CONTROLLER 677#ifdef CONFIG_NET_POLL_CONTROLLER
666 ndev->poll_controller = &dm9000_poll_controller; 678 ndev->poll_controller = &dm9000_poll_controller;