diff options
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 7c717907896d..5e90557715ab 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -780,11 +780,15 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) | |||
780 | } | 780 | } |
781 | 781 | ||
782 | /* Schedule rx intr now? */ | 782 | /* Schedule rx intr now? */ |
783 | static inline int netif_rx_schedule_test(struct net_device *dev) | ||
784 | { | ||
785 | return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
786 | } | ||
783 | 787 | ||
788 | /* Schedule only if device is up */ | ||
784 | static inline int netif_rx_schedule_prep(struct net_device *dev) | 789 | static inline int netif_rx_schedule_prep(struct net_device *dev) |
785 | { | 790 | { |
786 | return netif_running(dev) && | 791 | return netif_running(dev) && netif_rx_schedule_test(dev); |
787 | !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
788 | } | 792 | } |
789 | 793 | ||
790 | /* Add interface to tail of rx poll list. This assumes that _prep has | 794 | /* Add interface to tail of rx poll list. This assumes that _prep has |