[ovs-dev] [compat 2/6] datapath: Fix off-by-one error in dev_get_stats() compat code.
Ben Pfaff
blp at nicira.com
Fri Dec 10 22:47:50 UTC 2010
dev_get_stats() was introduced in 2.6.29, not 2.6.28.
Signed-off-by: Ben Pfaff <blp at nicira.com>
---
datapath/linux-2.6/compat-2.6/netdevice.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/datapath/linux-2.6/compat-2.6/netdevice.c b/datapath/linux-2.6/compat-2.6/netdevice.c
index 2980458..1a6f327 100644
--- a/datapath/linux-2.6/compat-2.6/netdevice.c
+++ b/datapath/linux-2.6/compat-2.6/netdevice.c
@@ -14,11 +14,11 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
{
const struct net_device_stats *stats;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
stats = dev->get_stats(dev);
-#else /* 2.6.28 <= kernel version < 2.6.36 */
+#else /* 2.6.28 < kernel version < 2.6.36 */
stats = (dev_get_stats)(dev);
-#endif /* 2.6.28 <= kernel version < 2.6.36 */
+#endif /* 2.6.28 < kernel version < 2.6.36 */
storage->rx_packets = stats->rx_packets;
storage->tx_packets = stats->tx_packets;
--
1.7.1
More information about the dev
mailing list