diff --git a/[refs] b/[refs] index 55bb27f249b2..2401f962e32a 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9f35a7342cff0be72e3c038ea972e07662ca1ce8 +refs/heads/master: 8f4cccbbd92f2ad0ddbbc498ef7cee2a1c3defe9 diff --git a/trunk/include/linux/netdevice.h b/trunk/include/linux/netdevice.h index 9ad7fa8c10e0..ccac82e61604 100644 --- a/trunk/include/linux/netdevice.h +++ b/trunk/include/linux/netdevice.h @@ -2227,6 +2227,7 @@ static inline void dev_hold(struct net_device *dev) * kind of lower layer not just hardware media. */ +extern void linkwatch_init_dev(struct net_device *dev); extern void linkwatch_fire_event(struct net_device *dev); extern void linkwatch_forget_dev(struct net_device *dev); diff --git a/trunk/net/core/dev.c b/trunk/net/core/dev.c index bc857fead8c8..2f25d0cac51c 100644 --- a/trunk/net/core/dev.c +++ b/trunk/net/core/dev.c @@ -5648,6 +5648,8 @@ int register_netdevice(struct net_device *dev) set_bit(__LINK_STATE_PRESENT, &dev->state); + linkwatch_init_dev(dev); + dev_init_scheduler(dev); dev_hold(dev); list_netdevice(dev); diff --git a/trunk/net/core/link_watch.c b/trunk/net/core/link_watch.c index c3519c6d1b16..a01922219a23 100644 --- a/trunk/net/core/link_watch.c +++ b/trunk/net/core/link_watch.c @@ -76,6 +76,14 @@ static void rfc2863_policy(struct net_device *dev) } +void linkwatch_init_dev(struct net_device *dev) +{ + /* Handle pre-registration link state changes */ + if (!netif_carrier_ok(dev) || netif_dormant(dev)) + rfc2863_policy(dev); +} + + static bool linkwatch_urgent_event(struct net_device *dev) { if (!netif_running(dev))