diff options
Diffstat (limited to 'include/linux')
-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 a9281b24c40b..deacea65273a 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -801,11 +801,15 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) | |||
801 | } | 801 | } |
802 | 802 | ||
803 | /* Schedule rx intr now? */ | 803 | /* Schedule rx intr now? */ |
804 | static inline int netif_rx_schedule_test(struct net_device *dev) | ||
805 | { | ||
806 | return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
807 | } | ||
804 | 808 | ||
809 | /* Schedule only if device is up */ | ||
805 | static inline int netif_rx_schedule_prep(struct net_device *dev) | 810 | static inline int netif_rx_schedule_prep(struct net_device *dev) |
806 | { | 811 | { |
807 | return netif_running(dev) && | 812 | return netif_running(dev) && netif_rx_schedule_test(dev); |
808 | !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
809 | } | 813 | } |
810 | 814 | ||
811 | /* Add interface to tail of rx poll list. This assumes that _prep has | 815 | /* Add interface to tail of rx poll list. This assumes that _prep has |