aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/netpoll.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/netpoll.h')
-rw-r--r--include/linux/netpoll.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index a0525a1f4715..e3d79593fb3a 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -25,6 +25,7 @@ struct netpoll {
25 25
26struct netpoll_info { 26struct netpoll_info {
27 atomic_t refcnt; 27 atomic_t refcnt;
28 int rx_flags;
28 spinlock_t rx_lock; 29 spinlock_t rx_lock;
29 struct netpoll *rx_np; /* netpoll that registered an rx_hook */ 30 struct netpoll *rx_np; /* netpoll that registered an rx_hook */
30 struct sk_buff_head arp_tx; /* list of arp requests to reply to */ 31 struct sk_buff_head arp_tx; /* list of arp requests to reply to */
@@ -50,12 +51,12 @@ static inline int netpoll_rx(struct sk_buff *skb)
50 unsigned long flags; 51 unsigned long flags;
51 int ret = 0; 52 int ret = 0;
52 53
53 if (!npinfo || !npinfo->rx_np) 54 if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags))
54 return 0; 55 return 0;
55 56
56 spin_lock_irqsave(&npinfo->rx_lock, flags); 57 spin_lock_irqsave(&npinfo->rx_lock, flags);
57 /* check rx_np again with the lock held */ 58 /* check rx_flags again with the lock held */
58 if (npinfo->rx_np && __netpoll_rx(skb)) 59 if (npinfo->rx_flags && __netpoll_rx(skb))
59 ret = 1; 60 ret = 1;
60 spin_unlock_irqrestore(&npinfo->rx_lock, flags); 61 spin_unlock_irqrestore(&npinfo->rx_lock, flags);
61 62