diff options
author | David S. Miller <davem@davemloft.net> | 2008-11-21 01:44:00 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-21 01:44:00 +0100 |
commit | 6ab33d51713d6d60c7677c0d020910a8cb37e513 (patch) | |
tree | 546c2ff099b2757e75cf34ddace874f1220f740e /net/sched/sch_generic.c | |
parent | netdevice wanrouter: Convert directly reference of netdev->priv (diff) | |
parent | Linux 2.6.28-rc6 (diff) | |
download | linux-6ab33d51713d6d60c7677c0d020910a8cb37e513.tar.xz linux-6ab33d51713d6d60c7677c0d020910a8cb37e513.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/ixgbe/ixgbe_main.c
include/net/mac80211.h
net/phonet/af_phonet.c
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r-- | net/sched/sch_generic.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 95ab55c064f1..5f5efe4e6072 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -270,6 +270,8 @@ static void dev_watchdog_down(struct net_device *dev) void netif_carrier_on(struct net_device *dev) { if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) { + if (dev->reg_state == NETREG_UNINITIALIZED) + return; linkwatch_fire_event(dev); if (netif_running(dev)) __netdev_watchdog_up(dev); @@ -285,8 +287,11 @@ EXPORT_SYMBOL(netif_carrier_on); */ void netif_carrier_off(struct net_device *dev) { - if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) + if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) { + if (dev->reg_state == NETREG_UNINITIALIZED) + return; linkwatch_fire_event(dev); + } } EXPORT_SYMBOL(netif_carrier_off); |