aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_generic.c')
-rw-r--r--net/sched/sch_generic.c7
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)
270void netif_carrier_on(struct net_device *dev) 270void netif_carrier_on(struct net_device *dev)
271{ 271{
272 if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) { 272 if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
273 if (dev->reg_state == NETREG_UNINITIALIZED)
274 return;
273 linkwatch_fire_event(dev); 275 linkwatch_fire_event(dev);
274 if (netif_running(dev)) 276 if (netif_running(dev))
275 __netdev_watchdog_up(dev); 277 __netdev_watchdog_up(dev);
@@ -285,8 +287,11 @@ EXPORT_SYMBOL(netif_carrier_on);
285 */ 287 */
286void netif_carrier_off(struct net_device *dev) 288void netif_carrier_off(struct net_device *dev)
287{ 289{
288 if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) 290 if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) {
291 if (dev->reg_state == NETREG_UNINITIALIZED)
292 return;
289 linkwatch_fire_event(dev); 293 linkwatch_fire_event(dev);
294 }
290} 295}
291EXPORT_SYMBOL(netif_carrier_off); 296EXPORT_SYMBOL(netif_carrier_off);
292 297