diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-09 02:11:25 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-09 02:11:25 -0400 |
commit | 86d804e10a37cd86f16bf72386c37e843a98a74b (patch) | |
tree | 04483a937f11c752aea998298a27fc79e6851b2d /net/core | |
parent | 970565bbad0c7b98db0d14131a69e5a0f4445d49 (diff) |
netdev: Make netif_schedule() routines work with netdev_queue objects.
Only plain netif_schedule() remains taking a net_device, mostly as a
compatability item while we transition the rest of these interfaces.
Everything else calls netif_schedule_queue() or __netif_schedule(),
both of which take a netdev_queue pointer.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index d6b8d3c3e6ec..0dc888ad4217 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1320,12 +1320,13 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1320 | } | 1320 | } |
1321 | 1321 | ||
1322 | 1322 | ||
1323 | void __netif_schedule(struct net_device *dev) | 1323 | void __netif_schedule(struct netdev_queue *txq) |
1324 | { | 1324 | { |
1325 | struct net_device *dev = txq->dev; | ||
1326 | |||
1325 | if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) { | 1327 | if (!test_and_set_bit(__LINK_STATE_SCHED, &dev->state)) { |
1326 | struct netdev_queue *txq = &dev->tx_queue; | ||
1327 | unsigned long flags; | ||
1328 | struct softnet_data *sd; | 1328 | struct softnet_data *sd; |
1329 | unsigned long flags; | ||
1329 | 1330 | ||
1330 | local_irq_save(flags); | 1331 | local_irq_save(flags); |
1331 | sd = &__get_cpu_var(softnet_data); | 1332 | sd = &__get_cpu_var(softnet_data); |
@@ -1932,7 +1933,7 @@ static void net_tx_action(struct softirq_action *h) | |||
1932 | qdisc_run(dev); | 1933 | qdisc_run(dev); |
1933 | spin_unlock(&txq->lock); | 1934 | spin_unlock(&txq->lock); |
1934 | } else { | 1935 | } else { |
1935 | netif_schedule(dev); | 1936 | netif_schedule_queue(txq); |
1936 | } | 1937 | } |
1937 | } | 1938 | } |
1938 | } | 1939 | } |