diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-08 23:11:25 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-08 23:11:25 -0700 |
commit | 86d804e10a37cd86f16bf72386c37e843a98a74b (patch) | |
tree | 04483a937f11c752aea998298a27fc79e6851b2d /include/linux/netdevice.h | |
parent | 970565bbad0c7b98db0d14131a69e5a0f4445d49 (diff) | |
download | op-kernel-dev-86d804e10a37cd86f16bf72386c37e843a98a74b.zip op-kernel-dev-86d804e10a37cd86f16bf72386c37e843a98a74b.tar.gz |
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 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index aae6c6d..28aa8e7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h @@ -952,12 +952,19 @@ DECLARE_PER_CPU(struct softnet_data,softnet_data); #define HAVE_NETIF_QUEUE -extern void __netif_schedule(struct net_device *dev); +extern void __netif_schedule(struct netdev_queue *txq); -static inline void netif_schedule(struct net_device *dev) +static inline void netif_schedule_queue(struct netdev_queue *txq) { + struct net_device *dev = txq->dev; + if (!test_bit(__LINK_STATE_XOFF, &dev->state)) - __netif_schedule(dev); + __netif_schedule(txq); +} + +static inline void netif_schedule(struct net_device *dev) +{ + netif_schedule_queue(&dev->tx_queue); } /** @@ -987,7 +994,7 @@ static inline void netif_wake_queue(struct net_device *dev) } #endif if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) - __netif_schedule(dev); + __netif_schedule(&dev->tx_queue); } /** @@ -1103,7 +1110,7 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) #endif if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->egress_subqueue[queue_index].state)) - __netif_schedule(dev); + __netif_schedule(&dev->tx_queue); #endif } |