@@ -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. */
@@ -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;
}
@@ -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);
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(-)