compat: backport ethtool_cmd_speed
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 10 May 2011 11:10:16 +0000 (13:10 +0200)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 10 May 2011 21:50:43 +0000 (14:50 -0700)
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
include/linux/compat-2.6.27.h

index b9d7029450ac215c3e526c998f9a522a891db86a..ed2035cc3e8cd20a4f2b829fad4a567cbb1a5d63 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/wireless.h>
 #include <linux/skbuff.h>
 #include <net/sch_generic.h>
+#include <linux/ethtool.h>
 
 #define PCI_PM_CAP_PME_SHIFT   11
 
@@ -238,6 +239,17 @@ static inline void debugfs_remove_recursive(struct dentry *dentry)
 
 #define dev_name(dev) dev_name((struct device *)dev)
 
+static inline void ethtool_cmd_speed_set(struct ethtool_cmd *ep,
+                                        __u32 speed)
+{
+       ep->speed = (__u16)speed;
+}
+
+static inline __u32 ethtool_cmd_speed(const struct ethtool_cmd *ep)
+{
+       return ep->speed;
+}
+
 #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)) */
 
 #endif /* LINUX_26_27_COMPAT_H */