summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBrandon Philips <brandon@ifup.org>2008-07-15 11:18:41 +0200
committerJeff Garzik <jgarzik@redhat.com>2008-08-07 08:22:08 +0200
commitb11f8d8cc3bb2fa6fa55286babc1a5ebb2e932c4 (patch)
treebafbb4ca35003403da55c5a34c56e2390d1af8b2 /include
parentpegasus: add blacklist support to fix Belkin bluetooth dongle. (diff)
downloadlinux-b11f8d8cc3bb2fa6fa55286babc1a5ebb2e932c4.tar.xz
linux-b11f8d8cc3bb2fa6fa55286babc1a5ebb2e932c4.zip
ethtool: Expand ethtool_cmd.speed to 32 bits
Introduce the speed_hi field to ethtool_cmd, using the reserved space, to expand the speed field to 2^32 Megabits/second. Making this field expansion now gives us plenty of time to fix up the user-space pieces that use SIOCETHTOOL before hardware faster than 64 Gb/s is available. Signed-off-by: Brandon Philips <bphilips@suse.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/ethtool.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index 8bb5e87df365..b4b038b89ee6 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -27,9 +27,24 @@ struct ethtool_cmd {
__u8 autoneg; /* Enable or disable autonegotiation */
__u32 maxtxpkt; /* Tx pkts before generating tx int */
__u32 maxrxpkt; /* Rx pkts before generating rx int */
- __u32 reserved[4];
+ __u16 speed_hi;
+ __u16 reserved2;
+ __u32 reserved[3];
};
+static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
+ __u32 speed)
+{
+
+ ep->speed = (__u16)speed;
+ ep->speed_hi = (__u16)(speed >> 16);
+}
+
+static inline __u32 ethtool_cmd_speed(struct ethtool_cmd *ep)
+{
+ return (ep->speed_hi << 16) | ep->speed;
+}
+
#define ETHTOOL_BUSINFO_LEN 32
/* these strings are set to whatever the driver author decides... */
struct ethtool_drvinfo {