aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4fceff0e59ec..07e114d48bbb 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -803,11 +803,15 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
803} 803}
804 804
805/* Schedule rx intr now? */ 805/* Schedule rx intr now? */
806static inline int netif_rx_schedule_test(struct net_device *dev)
807{
808 return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
809}
806 810
811/* Schedule only if device is up */
807static inline int netif_rx_schedule_prep(struct net_device *dev) 812static inline int netif_rx_schedule_prep(struct net_device *dev)
808{ 813{
809 return netif_running(dev) && 814 return netif_running(dev) && netif_rx_schedule_test(dev);
810 !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
811} 815}
812 816
813/* Add interface to tail of rx poll list. This assumes that _prep has 817/* Add interface to tail of rx poll list. This assumes that _prep has