Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 6336
b: refs/heads/master
c: 0a242ef
h: refs/heads/master
v: v3
  • Loading branch information
Denis Vlasenko authored and David S. Miller committed Aug 29, 2005
1 parent 0465be8 commit 391e1a1
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5917ed961def82a4dba9198d11a75f79d115a8cb
refs/heads/master: 0a242efc4fb859b2da506cdf8f3366231602e4ff
14 changes: 2 additions & 12 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -699,19 +699,9 @@ static inline int netif_carrier_ok(const struct net_device *dev)

extern void __netdev_watchdog_up(struct net_device *dev);

static inline void netif_carrier_on(struct net_device *dev)
{
if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state))
linkwatch_fire_event(dev);
if (netif_running(dev))
__netdev_watchdog_up(dev);
}
extern void netif_carrier_on(struct net_device *dev);

static inline void netif_carrier_off(struct net_device *dev)
{
if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state))
linkwatch_fire_event(dev);
}
extern void netif_carrier_off(struct net_device *dev);

/* Hot-plugging. */
static inline int netif_device_present(struct net_device *dev)
Expand Down
16 changes: 16 additions & 0 deletions trunk/net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,20 @@ static void dev_watchdog_down(struct net_device *dev)
spin_unlock_bh(&dev->xmit_lock);
}

void netif_carrier_on(struct net_device *dev)
{
if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state))
linkwatch_fire_event(dev);
if (netif_running(dev))
__netdev_watchdog_up(dev);
}

void netif_carrier_off(struct net_device *dev)
{
if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state))
linkwatch_fire_event(dev);
}

/* "NOOP" scheduler: the best scheduler, recommended for all interfaces
under all circumstances. It is difficult to invent anything faster or
cheaper.
Expand Down Expand Up @@ -600,6 +614,8 @@ void dev_shutdown(struct net_device *dev)
}

EXPORT_SYMBOL(__netdev_watchdog_up);
EXPORT_SYMBOL(netif_carrier_on);
EXPORT_SYMBOL(netif_carrier_off);
EXPORT_SYMBOL(noop_qdisc);
EXPORT_SYMBOL(noop_qdisc_ops);
EXPORT_SYMBOL(qdisc_create_dflt);
Expand Down

0 comments on commit 391e1a1

Please sign in to comment.