RFC sent out to list, with no objections.
Adds driver info exportable via ioctl. Exporting bus info allows
userspace utilities to make the critical association between registered
interface and bus address. Exporting driver name and version info is
done in various hack-y ways, this puts such code in one location.
Further, this allows userspace utilities which support more than one
driver type to determine which set of driver-private ioctls to use.
diff -u linux_2_4/include/linux/ethtool.h:1.1.1.2
linux_2_4/include/linux/ethtool.h:1.1.1.2.140.1
--- linux_2_4/include/linux/ethtool.h:1.1.1.2 Tue Nov 14 14:01:49 2000
+++ linux_2_4/include/linux/ethtool.h Fri Mar 23 20:04:23 2001
@@ -1,4 +1,4 @@
-/* $Id: ethtool.h,v 1.1.1.2 2000/11/14 22:01:49 jgarzik Exp $
+/* $Id: ethtool.h,v 1.1.1.2.140.1 2001/03/24 04:04:23 jgarzik Exp $
* ethtool.h: Defines for Linux ethtool.
*
* Copyright (C) 1998 David S. Miller (davem@xxxxxxxxxx)
@@ -24,10 +24,22 @@
u32 reserved[4];
};
+/* these strings are set to whatever the driver author decides... */
+struct ethtool_drvinfo {
+ u32 cmd;
+ char driver[32]; /* driver short name, "tulip", "eepro100" */
+ char version[32]; /* driver version string */
+ char fw_version[32]; /* firmware version string, if applicable */
+ char bus_info[32]; /* Bus info for this interface. For PCI
+ * devices, use pci_dev->slot_name. */
+ char reserved1[32];
+ char reserved2[32];
+};
/* CMDs currently supported */
-#define ETHTOOL_GSET 0x00000001 /* Get settings, non-privileged. */
+#define ETHTOOL_GSET 0x00000001 /* Get settings. */
#define ETHTOOL_SSET 0x00000002 /* Set settings, privileged. */
+#define ETHTOOL_GDRVINFO 0x00000003 /* Get driver info. */
/* compatibility with older code */
#define SPARC_ETH_GSET ETHTOOL_GSET
|