--- ifprop.c
+++ ifprop.c
@@ -53,6 +53,14 @@
 #include <linux/ethtool.h>
 #include <linux/wireless.h>
 
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27)
+ // ep->speed_hi & ethtool_cmd_speed are both available since 2.6.27, see https://github.com/torvalds/linux/commit/b11f8d8cc3bb2fa6fa55286babc1a5ebb2e932c4
+static __u32 ethtool_cmd_speed(struct ethtool_cmd *ep) {
+	return /*(ep->speed_hi << 16) |*/ ep->speed;
+}
+#endif
+
 #ifndef	SPEED_UNKNOWN
 #define	SPEED_UNKNOWN	-1
 #endif
