aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorKai Engert <kengert@redhat.com>2006-12-12 15:09:41 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-05 16:58:42 -0500
commitff86a543e9de35c5b17a289a58aed0be4e7b9d22 (patch)
tree43faf87aa7919bcbdb1ea1caff7126d542022674 /drivers/net/wireless
parent01917382865bb640fc00df7ea476a14c8c539ec3 (diff)
[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')
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.c13
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.h4
-rw-r--r--drivers/net/wireless/prism54/islpci_hotplug.c3
3 files changed, 17 insertions, 3 deletions
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c
index f057fd9fcd79..a037b11dac9d 100644
--- a/drivers/net/wireless/prism54/islpci_dev.c
+++ b/drivers/net/wireless/prism54/islpci_dev.c
@@ -21,6 +21,7 @@
21#include <linux/module.h> 21#include <linux/module.h>
22 22
23#include <linux/netdevice.h> 23#include <linux/netdevice.h>
24#include <linux/ethtool.h>
24#include <linux/pci.h> 25#include <linux/pci.h>
25#include <linux/etherdevice.h> 26#include <linux/etherdevice.h>
26#include <linux/delay.h> 27#include <linux/delay.h>
@@ -787,6 +788,17 @@ islpci_set_multicast_list(struct net_device *dev)
787} 788}
788#endif 789#endif
789 790
791static void islpci_ethtool_get_drvinfo(struct net_device *dev,
792 struct ethtool_drvinfo *info)
793{
794 strcpy(info->driver, DRV_NAME);
795 strcpy(info->version, DRV_VERSION);
796}
797
798static struct ethtool_ops islpci_ethtool_ops = {
799 .get_drvinfo = islpci_ethtool_get_drvinfo,
800};
801
790struct net_device * 802struct net_device *
791islpci_setup(struct pci_dev *pdev) 803islpci_setup(struct pci_dev *pdev)
792{ 804{
@@ -813,6 +825,7 @@ islpci_setup(struct pci_dev *pdev)
813 ndev->do_ioctl = &prism54_ioctl; 825 ndev->do_ioctl = &prism54_ioctl;
814 ndev->wireless_handlers = 826 ndev->wireless_handlers =
815 (struct iw_handler_def *) &prism54_handler_def; 827 (struct iw_handler_def *) &prism54_handler_def;
828 ndev->ethtool_ops = &islpci_ethtool_ops;
816 829
817 ndev->hard_start_xmit = &islpci_eth_transmit; 830 ndev->hard_start_xmit = &islpci_eth_transmit;
818 /* ndev->set_multicast_list = &islpci_set_multicast_list; */ 831 /* ndev->set_multicast_list = &islpci_set_multicast_list; */
diff --git a/drivers/net/wireless/prism54/islpci_dev.h b/drivers/net/wireless/prism54/islpci_dev.h
index a9aa1662eaa4..736666da6c24 100644
--- a/drivers/net/wireless/prism54/islpci_dev.h
+++ b/drivers/net/wireless/prism54/islpci_dev.h
@@ -211,4 +211,8 @@ islpci_trigger(islpci_private *priv)
211 211
212int islpci_free_memory(islpci_private *); 212int islpci_free_memory(islpci_private *);
213struct net_device *islpci_setup(struct pci_dev *); 213struct net_device *islpci_setup(struct pci_dev *);
214
215#define DRV_NAME "prism54"
216#define DRV_VERSION "1.2"
217
214#endif /* _ISLPCI_DEV_H */ 218#endif /* _ISLPCI_DEV_H */
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c
index 58257b40c043..3dcb13bb7d57 100644
--- a/drivers/net/wireless/prism54/islpci_hotplug.c
+++ b/drivers/net/wireless/prism54/islpci_hotplug.c
@@ -28,9 +28,6 @@
28#include "islpci_mgt.h" /* for pc_debug */ 28#include "islpci_mgt.h" /* for pc_debug */
29#include "isl_oid.h" 29#include "isl_oid.h"
30 30
31#define DRV_NAME "prism54"
32#define DRV_VERSION "1.2"
33
34MODULE_AUTHOR("[Intersil] R.Bastings and W.Termorshuizen, The prism54.org Development Team <prism54-devel@prism54.org>"); 31MODULE_AUTHOR("[Intersil] R.Bastings and W.Termorshuizen, The prism54.org Development Team <prism54-devel@prism54.org>");
35MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter"); 32MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter");
36MODULE_LICENSE("GPL"); 33MODULE_LICENSE("GPL");