diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-11-19 19:37:09 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 14:54:18 -0800 |
commit | c7b6ea24b43afb5749cb704e143df19d70e23dea (patch) | |
tree | e46281225b1cec008b5a65ece47b8d5f1a8d7abd /include | |
parent | 33f807ba0d9259e7c75c7a2ce8bd2787e5b540c7 (diff) | |
download | linux-3.10-c7b6ea24b43afb5749cb704e143df19d70e23dea.tar.gz linux-3.10-c7b6ea24b43afb5749cb704e143df19d70e23dea.tar.bz2 linux-3.10-c7b6ea24b43afb5749cb704e143df19d70e23dea.zip |
[NETPOLL]: Don't need rx_flags.
The rx_flags variable is redundant. Turning rx on/off is done
via setting the rx_np pointer.
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netpoll.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index e3d79593fb3..a0525a1f471 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h @@ -25,7 +25,6 @@ struct netpoll { struct netpoll_info { atomic_t refcnt; - int rx_flags; spinlock_t rx_lock; struct netpoll *rx_np; /* netpoll that registered an rx_hook */ struct sk_buff_head arp_tx; /* list of arp requests to reply to */ @@ -51,12 +50,12 @@ static inline int netpoll_rx(struct sk_buff *skb) unsigned long flags; int ret = 0; - if (!npinfo || (!npinfo->rx_np && !npinfo->rx_flags)) + if (!npinfo || !npinfo->rx_np) return 0; spin_lock_irqsave(&npinfo->rx_lock, flags); - /* check rx_flags again with the lock held */ - if (npinfo->rx_flags && __netpoll_rx(skb)) + /* check rx_np again with the lock held */ + if (npinfo->rx_np && __netpoll_rx(skb)) ret = 1; spin_unlock_irqrestore(&npinfo->rx_lock, flags); |