Commit 14d1232f490c1c696582909fb3b69e67a8d38a34

Authored by Michał Mirosław
Committed by David S. Miller
1 parent 8e9b59b219

net: avoid initial "Features changed" message

Avoid "Features changed" message and ndo_set_features call on device
registration caused by automatic enabling of GSO and GRO. Driver should
have enabled hardware offloads it set in features, so the ndo_set_features()
is not needed at registration time.

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff

... ... @@ -5476,12 +5476,14 @@
5476 5476 * software offloads (GSO and GRO).
5477 5477 */
5478 5478 dev->hw_features |= NETIF_F_SOFT_FEATURES;
5479   - dev->wanted_features = (dev->features & dev->hw_features)
5480   - | NETIF_F_SOFT_FEATURES;
  5479 + dev->features |= NETIF_F_SOFT_FEATURES;
  5480 + dev->wanted_features = dev->features & dev->hw_features;
5481 5481  
5482 5482 /* Avoid warning from netdev_fix_features() for GSO without SG */
5483   - if (!(dev->wanted_features & NETIF_F_SG))
  5483 + if (!(dev->wanted_features & NETIF_F_SG)) {
5484 5484 dev->wanted_features &= ~NETIF_F_GSO;
  5485 + dev->features &= ~NETIF_F_GSO;
  5486 + }
5485 5487  
5486 5488 /* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
5487 5489 * vlan_dev_init() will do the dev->features check, so these features