summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/prism54/islpci_dev.c
diff options
context:
space:
mode:
authorKai Engert <kengert@redhat.com>2006-12-12 21:09:41 +0100
committerJeff Garzik <jeff@garzik.org>2007-02-05 16:58:42 -0500
commitff86a543e9de35c5b17a289a58aed0be4e7b9d22 (patch)
tree43faf87aa7919bcbdb1ea1caff7126d542022674 /drivers/net/wireless/prism54/islpci_dev.c
parent01917382865bb640fc00df7ea476a14c8c539ec3 (diff)
downloadop-kernel-dev-ff86a543e9de35c5b17a289a58aed0be4e7b9d22.zip
op-kernel-dev-ff86a543e9de35c5b17a289a58aed0be4e7b9d22.tar.gz
[PATCH] prism54: add ethtool -i interface
Add support for "ethtool -i" to prism54 driver. ethtool -i queries the specified device for associated driver information. This helps tools like Fedora's system-config-network to provide GUI management of network devices. I learned how to write this patch by reading the ipw2100 driver code. Signed-off-by: Kai Engert <kengert@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/prism54/islpci_dev.c')
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
index f057fd9..a037b11 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -21,6 +21,7 @@
#include <linux/module.h>
#include <linux/netdevice.h>
+#include <linux/ethtool.h>
#include <linux/pci.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
@@ -787,6 +788,17 @@ islpci_set_multicast_list(struct net_device *dev)
}
#endif
+static void islpci_ethtool_get_drvinfo(struct net_device *dev,
+ struct ethtool_drvinfo *info)
+{
+ strcpy(info->driver, DRV_NAME);
+ strcpy(info->version, DRV_VERSION);
+}
+
+static struct ethtool_ops islpci_ethtool_ops = {
+ .get_drvinfo = islpci_ethtool_get_drvinfo,
+};
+
struct net_device *
islpci_setup(struct pci_dev *pdev)
{
@@ -813,6 +825,7 @@ islpci_setup(struct pci_dev *pdev)
ndev->do_ioctl = &prism54_ioctl;
ndev->wireless_handlers =
(struct iw_handler_def *) &prism54_handler_def;
+ ndev->ethtool_ops = &islpci_ethtool_ops;
ndev->hard_start_xmit = &islpci_eth_transmit;
/* ndev->set_multicast_list = &islpci_set_multicast_list; */
OpenPOWER on IntegriCloud