All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Engert <kengert@redhat.com>
To: netdev@vger.kernel.org
Subject: [patch] Add ethtool -i interface to Prism54
Date: Thu, 19 Oct 2006 03:33:34 +0200	[thread overview]
Message-ID: <4536D5EE.4060405@redhat.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

Attached is a small patch that will add support for
  ethtool -i
to the prism54 driver.

ethtool -i queries the specified ethernet 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.

Thanks for considering to take it.
Kai


[-- Attachment #2: prism54ethtool --]
[-- Type: text/plain, Size: 2047 bytes --]

--- linux-2.6.16/drivers/net/wireless/prism54/islpci_dev.h.preke	2006-03-20 06:53:29.000000000 +0100
+++ linux-2.6.16/drivers/net/wireless/prism54/islpci_dev.h	2006-04-12 15:12:30.000000000 +0200
@@ -210,4 +210,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.16/drivers/net/wireless/prism54/islpci_dev.c.preke	2006-04-12 14:56:12.000000000 +0200
+++ linux-2.6.16/drivers/net/wireless/prism54/islpci_dev.c	2006-04-13 01:39:27.000000000 +0200
@@ -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.16/drivers/net/wireless/prism54/islpci_hotplug.c.preke	2006-04-12 14:56:22.000000000 +0200
+++ linux-2.6.16/drivers/net/wireless/prism54/islpci_hotplug.c	2006-04-12 15:14:16.000000000 +0200
@@ -28,9 +28,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@prism54.org>");
 MODULE_DESCRIPTION("The Prism54 802.11 Wireless LAN adapter");
 MODULE_LICENSE("GPL");

             reply	other threads:[~2006-10-19  1:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19  1:33 Kai Engert [this message]
2006-10-21 18:19 ` [patch] Add ethtool -i interface to Prism54 Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4536D5EE.4060405@redhat.com \
    --to=kengert@redhat.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.