From 2a529ead2a3a3a6367896834ef2024ea1a6dd396 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 7 Mar 2012 15:27:52 -0800 Subject: [PATCH] netdev-linux: Fix build failure with old kernel headers. The "speed_hi" member was only introduced in 2.6.27, so builds against older kernel headers failed. speed_hi is fully backward compatible with older kernels, because older kernels always set it to 0, so we could easily introduce a compatibility layer here, but in fact I don't know of any OVS users who have interfaces faster than 65.5 Gb/s, so it's hardly urgent. Signed-off-by: Ben Pfaff --- lib/netdev-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 939221b5..3c474e37 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -1498,7 +1498,7 @@ netdev_linux_get_features(const struct netdev *netdev, } /* Current settings. */ - speed = (ecmd.speed_hi << 16) | ecmd.speed; + speed = ecmd.speed; if (speed == SPEED_10) { *current = ecmd.duplex ? NETDEV_F_10MB_FD : NETDEV_F_10MB_HD; } else if (speed == SPEED_100) { -- 2.30.2