lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Tue, 12 Dec 2006 21:09:41 +0100
From:	Kai Engert <kengert@...hat.com>
To:	netdev@...r.kernel.org
Subject: [PATCH 2.6.19.1] 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@...hat.com>

--- linux-2.6.19.1/drivers/net/wireless/prism54/islpci_dev.h.preke	2006-12-11 20:32:53.000000000 +0100
+++ linux-2.6.19.1/drivers/net/wireless/prism54/islpci_dev.h	2006-12-12 20:33:09.000000000 +0100
@@ -212,4 +212,8 @@

int islpci_free_memory(islpci_private *);
struct net_device *islpci_setup(struct pci_dev *);
+
+#define DRV_NAME	"prism54"
+#define DRV_VERSION	"1.2"
+
#endif				/* _ISLPCI_DEV_H */
--- linux-2.6.19.1/drivers/net/wireless/prism54/islpci_dev.c.preke	2006-12-11 20:32:53.000000000 +0100
+++ linux-2.6.19.1/drivers/net/wireless/prism54/islpci_dev.c	2006-12-12 20:33:09.000000000 +0100
@@ -22,6 +22,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>
@@ -788,6 +789,17 @@
}
#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)
{
@@ -814,6 +826,7 @@
	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; */
--- linux-2.6.19.1/drivers/net/wireless/prism54/islpci_hotplug.c.preke	2006-12-11 20:32:53.000000000 +0100
+++ linux-2.6.19.1/drivers/net/wireless/prism54/islpci_hotplug.c	2006-12-12 20:33:09.000000000 +0100
@@ -29,9 +29,6 @@
#include "islpci_mgt.h"		/* for pc_debug */
#include "isl_oid.h"

-#define DRV_NAME	"prism54"
-#define DRV_VERSION	"1.2"
-
MODULE_AUTHOR("[Intersil] R.Bastings and W.Termorshuizen, The prism54.org Development Team <prism54-devel@...sm54.org>");
MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter");
MODULE_LICENSE("GPL");



-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ