From 3e6f9970d444e1256f94033f75fe257e3e47168e Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 10 May 2011 13:10:16 +0200 Subject: [PATCH] compat: backport ethtool_cmd_speed Signed-off-by: Hauke Mehrtens --- include/linux/compat-2.6.27.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/compat-2.6.27.h b/include/linux/compat-2.6.27.h index b9d7029450ac..ed2035cc3e8c 100644 --- a/include/linux/compat-2.6.27.h +++ b/include/linux/compat-2.6.27.h @@ -20,6 +20,7 @@ #include #include #include +#include #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 */ -- 2.30.2