diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netdevice.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 936f8b76114e..7fda03d338d1 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -684,6 +684,7 @@ extern int netif_rx(struct sk_buff *skb); | |||
684 | extern int netif_rx_ni(struct sk_buff *skb); | 684 | extern int netif_rx_ni(struct sk_buff *skb); |
685 | #define HAVE_NETIF_RECEIVE_SKB 1 | 685 | #define HAVE_NETIF_RECEIVE_SKB 1 |
686 | extern int netif_receive_skb(struct sk_buff *skb); | 686 | extern int netif_receive_skb(struct sk_buff *skb); |
687 | extern int dev_valid_name(const char *name); | ||
687 | extern int dev_ioctl(unsigned int cmd, void __user *); | 688 | extern int dev_ioctl(unsigned int cmd, void __user *); |
688 | extern int dev_ethtool(struct ifreq *); | 689 | extern int dev_ethtool(struct ifreq *); |
689 | extern unsigned dev_get_flags(const struct net_device *); | 690 | extern unsigned dev_get_flags(const struct net_device *); |
@@ -801,12 +802,16 @@ static inline u32 netif_msg_init(int debug_value, int default_msg_enable_bits) | |||
801 | return (1 << debug_value) - 1; | 802 | return (1 << debug_value) - 1; |
802 | } | 803 | } |
803 | 804 | ||
804 | /* Schedule rx intr now? */ | 805 | /* Test if receive needs to be scheduled */ |
806 | static inline int __netif_rx_schedule_prep(struct net_device *dev) | ||
807 | { | ||
808 | return !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
809 | } | ||
805 | 810 | ||
811 | /* Test if receive needs to be scheduled but only if up */ | ||
806 | static inline int netif_rx_schedule_prep(struct net_device *dev) | 812 | static inline int netif_rx_schedule_prep(struct net_device *dev) |
807 | { | 813 | { |
808 | return netif_running(dev) && | 814 | return netif_running(dev) && __netif_rx_schedule_prep(dev); |
809 | !test_and_set_bit(__LINK_STATE_RX_SCHED, &dev->state); | ||
810 | } | 815 | } |
811 | 816 | ||
812 | /* 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 |