From: Ben Pfaff Date: Wed, 7 Mar 2012 23:27:52 +0000 (-0800) Subject: netdev-linux: Fix build failure with old kernel headers. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a529ead2a3a3a6367896834ef2024ea1a6dd396;p=openvswitch 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 --- 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) {