Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327616
b: refs/heads/master
c: 8f4cccb
h: refs/heads/master
v: v3
  • Loading branch information
Ben Hutchings authored and David S. Miller committed Aug 24, 2012
1 parent 188fe70 commit edb9790
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9f35a7342cff0be72e3c038ea972e07662ca1ce8
refs/heads/master: 8f4cccbbd92f2ad0ddbbc498ef7cee2a1c3defe9
1 change: 1 addition & 0 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions trunk/net/core/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions trunk/net/core/link_watch.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit edb9790

Please sign in to comment.