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 /include/linux/netdevice.h | |
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 '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 aae6c6d153f2..28aa8e77cee9 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -952,12 +952,19 @@ DECLARE_PER_CPU(struct softnet_data,softnet_data); | |||
952 | 952 | ||
953 | #define HAVE_NETIF_QUEUE | 953 | #define HAVE_NETIF_QUEUE |
954 | 954 | ||
955 | extern void __netif_schedule(struct net_device *dev); | 955 | extern void __netif_schedule(struct netdev_queue *txq); |
956 | 956 | ||
957 | static inline void netif_schedule(struct net_device *dev) | 957 | static inline void netif_schedule_queue(struct netdev_queue *txq) |
958 | { | 958 | { |
959 | struct net_device *dev = txq->dev; | ||
960 | |||
959 | if (!test_bit(__LINK_STATE_XOFF, &dev->state)) | 961 | if (!test_bit(__LINK_STATE_XOFF, &dev->state)) |
960 | __netif_schedule(dev); | 962 | __netif_schedule(txq); |
963 | } | ||
964 | |||
965 | static inline void netif_schedule(struct net_device *dev) | ||
966 | { | ||
967 | netif_schedule_queue(&dev->tx_queue); | ||
961 | } | 968 | } |
962 | 969 | ||
963 | /** | 970 | /** |
@@ -987,7 +994,7 @@ static inline void netif_wake_queue(struct net_device *dev) | |||
987 | } | 994 | } |
988 | #endif | 995 | #endif |
989 | if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) | 996 | if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) |
990 | __netif_schedule(dev); | 997 | __netif_schedule(&dev->tx_queue); |
991 | } | 998 | } |
992 | 999 | ||
993 | /** | 1000 | /** |
@@ -1103,7 +1110,7 @@ static inline void netif_wake_subqueue(struct net_device *dev, u16 queue_index) | |||
1103 | #endif | 1110 | #endif |
1104 | if (test_and_clear_bit(__LINK_STATE_XOFF, | 1111 | if (test_and_clear_bit(__LINK_STATE_XOFF, |
1105 | &dev->egress_subqueue[queue_index].state)) | 1112 | &dev->egress_subqueue[queue_index].state)) |
1106 | __netif_schedule(dev); | 1113 | __netif_schedule(&dev->tx_queue); |
1107 | #endif | 1114 | #endif |
1108 | } | 1115 | } |
1109 | 1116 | ||