Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f42d8aeaf9a32ec130bc99f2e4ba84cafb028244
Commit:     f42d8aeaf9a32ec130bc99f2e4ba84cafb028244
Parent:     bb44fb70e069412c08e07f494b6b4e985f6331ac
Author:     Ben Dooks <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 5 00:02:21 2008 +0000
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Mon Feb 11 11:06:36 2008 -0500

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/dm9000.c |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/drivers/net/dm9000.c b/drivers/net/dm9000.c
index afd2cf5..e52078b 100644
--- a/drivers/net/dm9000.c
+++ b/drivers/net/dm9000.c
@@ -142,6 +142,7 @@ static int dm9000_probe(struct platform_device *);
 static int dm9000_open(struct net_device *);
 static int dm9000_start_xmit(struct sk_buff *, struct net_device *);
 static int dm9000_stop(struct net_device *);
+static int dm9000_ioctl(struct net_device *dev, struct ifreq *req, int cmd);
 
 static void dm9000_init_dm9000(struct net_device *);
 
@@ -332,6 +333,16 @@ static void dm9000_poll_controller(struct net_device *dev)
 }
 #endif
 
+static int dm9000_ioctl(struct net_device *dev, struct ifreq *req, int cmd)
+{
+       board_info_t *dm = to_dm9000_board(dev);
+
+       if (!netif_running(dev))
+               return -EINVAL;
+
+       return generic_mii_ioctl(&dm->mii, if_mii(req), cmd, NULL);
+}
+
 /* ethtool ops */
 
 static void dm9000_get_drvinfo(struct net_device *dev,
@@ -661,6 +672,7 @@ dm9000_probe(struct platform_device *pdev)
        ndev->stop               = &dm9000_stop;
        ndev->set_multicast_list = &dm9000_hash_table;
        ndev->ethtool_ops        = &dm9000_ethtool_ops;
+       ndev->do_ioctl           = &dm9000_ioctl;
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
        ndev->poll_controller    = &dm9000_poll_controller;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to