diff --git a/net/core/dev.c b/net/core/dev.c index 77e5edb724f4b3d8647a801d0821cac7da9d24e8..69a3c0817d6ff93fc086de7989fdee551c7f3e5d 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5476,12 +5476,14 @@ int register_netdevice(struct net_device *dev) * software offloads (GSO and GRO). */ dev->hw_features |= NETIF_F_SOFT_FEATURES; - dev->wanted_features = (dev->features & dev->hw_features) - | NETIF_F_SOFT_FEATURES; + dev->features |= NETIF_F_SOFT_FEATURES; + dev->wanted_features = dev->features & dev->hw_features; /* Avoid warning from netdev_fix_features() for GSO without SG */ - if (!(dev->wanted_features & NETIF_F_SG)) + if (!(dev->wanted_features & NETIF_F_SG)) { dev->wanted_features &= ~NETIF_F_GSO; + dev->features &= ~NETIF_F_GSO; + } /* Enable GRO and NETIF_F_HIGHDMA for vlans by default, * vlan_dev_init() will do the dev->features check, so these features