aboutsummaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-02-22 11:52:28 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-23 17:23:31 -0500
commit8e9b59b219e520cfc2f80af471c6b0e67ad9dd75 (patch)
tree93ff1838aa4f7c04b0ec58e7a61a7da50d66946b /net/core
parenta9a6fb374547044088ca37a30d4c3ca581cec80d (diff)
Fix "(unregistered net_device): Features changed" message
Fix netdev_update_features() messages on register time by moving the call further in register_netdevice(). When netdev->reg_state != NETREG_REGISTERED, netdev_name() returns "(unregistered netdevice)" even if the dev's name is already filled. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/dev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 578415c1ef75..77e5edb724f4 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -5483,8 +5483,6 @@ int register_netdevice(struct net_device *dev)
5483 if (!(dev->wanted_features & NETIF_F_SG)) 5483 if (!(dev->wanted_features & NETIF_F_SG))
5484 dev->wanted_features &= ~NETIF_F_GSO; 5484 dev->wanted_features &= ~NETIF_F_GSO;
5485 5485
5486 netdev_update_features(dev);
5487
5488 /* Enable GRO and NETIF_F_HIGHDMA for vlans by default, 5486 /* Enable GRO and NETIF_F_HIGHDMA for vlans by default,
5489 * vlan_dev_init() will do the dev->features check, so these features 5487 * vlan_dev_init() will do the dev->features check, so these features
5490 * are enabled only if supported by underlying device. 5488 * are enabled only if supported by underlying device.
@@ -5501,6 +5499,8 @@ int register_netdevice(struct net_device *dev)
5501 goto err_uninit; 5499 goto err_uninit;
5502 dev->reg_state = NETREG_REGISTERED; 5500 dev->reg_state = NETREG_REGISTERED;
5503 5501
5502 netdev_update_features(dev);
5503
5504 /* 5504 /*
5505 * Default initial state at registry is that the 5505 * Default initial state at registry is that the
5506 * device is present. 5506 * device is present.