diff mbox

[RFT,8/9] net: extend netdev_features_t to 64 bits

Message ID 8a12bc0824bce3b0678fcb68503cfaca97378c61.1308596963.git.mirq-linux@rere.qmqm.pl
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Michał Mirosław June 20, 2011, 7:14 p.m. UTC
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
---
 include/linux/netdev_features.h |    2 +-
 net/core/dev.c                  |   10 +++++-----
 net/core/net-sysfs.c            |    3 ++-
 3 files changed, 8 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/include/linux/netdev_features.h b/include/linux/netdev_features.h
index 2361e3ee..86d6193 100644
--- a/include/linux/netdev_features.h
+++ b/include/linux/netdev_features.h
@@ -12,7 +12,7 @@ 
 
 #include <linux/types.h>
 
-typedef u32 netdev_features_t;
+typedef u64 netdev_features_t;
 
 enum {
 	NETIF_F_SG_BIT,			/* Scatter/gather IO. */
diff --git a/net/core/dev.c b/net/core/dev.c
index a5a0e76..7e58353 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5271,18 +5271,18 @@  int __netdev_update_features(struct net_device *dev)
 	if (dev->features == features)
 		return 0;
 
-	BUILD_BUG_ON(sizeof(features) != sizeof(u32));	/* XXX: need: %Fx */
+	BUILD_BUG_ON(sizeof(features) != sizeof(u64));	/* XXX: need: %Fx */
 
-	netdev_dbg(dev, "Features changed: 0x%08x -> 0x%08x\n",
-		(u32)dev->features, (u32)features);
+	netdev_dbg(dev, "Features changed: 0x%016llx -> 0x%016llx\n",
+		(u64)dev->features, (u64)features);
 
 	if (dev->netdev_ops->ndo_set_features)
 		err = dev->netdev_ops->ndo_set_features(dev, features);
 
 	if (unlikely(err < 0)) {
 		netdev_err(dev,
-			"set_features() failed (%d); wanted 0x%08x, left 0x%08x\n",
-			err, (u32)features, (u32)dev->features);
+			"set_features() failed (%d); wanted 0x%016llx, left 0x%016llx\n",
+			err, (u64)features, (u64)dev->features);
 		return -1;
 	}
 
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index af35d90..b7feeab 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -27,6 +27,7 @@ 
 #ifdef CONFIG_SYSFS
 static const char fmt_hex[] = "%#x\n";
 static const char fmt_long_hex[] = "%#lx\n";
+static const char fmt_long_long_hex[] = "%#llx\n";
 static const char fmt_dec[] = "%d\n";
 static const char fmt_udec[] = "%u\n";
 static const char fmt_ulong[] = "%lu\n";
@@ -100,7 +101,7 @@  NETDEVICE_SHOW(addr_assign_type, fmt_dec);
 NETDEVICE_SHOW(addr_len, fmt_dec);
 NETDEVICE_SHOW(iflink, fmt_dec);
 NETDEVICE_SHOW(ifindex, fmt_dec);
-NETDEVICE_SHOW(features, fmt_hex);	/* XXX: need %Fx */
+NETDEVICE_SHOW(features, fmt_long_long_hex);	/* XXX: need %Fx */
 NETDEVICE_SHOW(type, fmt_dec);
 NETDEVICE_SHOW(link_mode, fmt_dec);