]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/netdevice.h
Merge branch 'master'
[linux-2.6-omap-h63xx.git] / include / linux / netdevice.h
index a9281b24c40b8bfa748899dad4c5e17574e4aaaf..deacea65273a4212b59ea06a368b910ec0be21d1 100644 (file)
@@ -801,11 +801,15 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits)
 }
 
 /* Schedule rx intr now? */
+static inline int netif_rx_schedule_test(struct net_device *dev)
+{
+       return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
+}
 
+/* Schedule only if device is up */
 static inline int netif_rx_schedule_prep(struct net_device *dev)
 {
-       return netif_running(dev) &&
-               !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state);
+       return netif_running(dev) && netif_rx_schedule_test(dev);
 }
 
 /* Add interface to tail of rx poll list. This assumes that _prep has