From: Hauke Mehrtens Date: Tue, 10 May 2011 11:10:16 +0000 (+0200) Subject: compat: backport ethtool_cmd_speed X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=3e6f9970d444e1256f94033f75fe257e3e47168e;p=openwrt%2Fstaging%2Fblogic.git compat: backport ethtool_cmd_speed Signed-off-by: Hauke Mehrtens --- 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 */