diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 23:20:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-04 23:20:58 -0500 |
commit | 27d0483aa1ef66a8877d71b63bb97f46ab0246b2 (patch) | |
tree | ca84a9db8c79b789d40d2d9ae30d0349fd3562fc /include | |
parent | 665c1ef8369138dad7773da6407fe77ccff87deb (diff) | |
parent | dea75bdfa57f75a7a7ec2961ec28db506c18e5db (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
[IPCONFIG]: The kernel gets no IP from some DHCP servers
b43legacy: Fix module init message
rndis_wlan: fix broken data copy
libertas: compare the current command with response
libertas: fix sanity check on sequence number in command response
p54: fix eeprom parser length sanity checks
p54: fix EEPROM structure endianness
ssb: Add pcibios_enable_device() return value check
rc80211-pid: fix rate adjustment
[ESP]: Add select on AUTHENC
[TCP]: Improve ipv4 established hash function.
[NETPOLL]: Revert two bogus cleanups that broke netconsole.
[PPPOL2TP]: Add missing sock_put() in pppol2tp_tunnel_closeall()
Subject: [PPPOL2TP] add missing sock_put() in pppol2tp_recv_dequeue()
[BLUETOOTH]: l2cap info_timer delete fix in hci_conn_del
[NET]: Fix race in generic address resolution.
iucv: fix build error on !SMP
[TCP]: Must count fack_count also when skipping
[TUN]: Fix RTNL-locking in tun/tap driver
[SCTP]: Use proc_create to setup de->proc_fops.
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/netpoll.h | 7 | ||||
-rw-r--r-- | include/net/inet_sock.h | 3 |
2 files changed, 6 insertions, 4 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 | ||
26 | struct netpoll_info { | 26 | struct 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 | ||
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h index 70013c5f4e59..89cd011edb99 100644 --- a/include/net/inet_sock.h +++ b/include/net/inet_sock.h | |||
@@ -175,7 +175,8 @@ extern void build_ehash_secret(void); | |||
175 | static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, | 175 | static inline unsigned int inet_ehashfn(const __be32 laddr, const __u16 lport, |
176 | const __be32 faddr, const __be16 fport) | 176 | const __be32 faddr, const __be16 fport) |
177 | { | 177 | { |
178 | return jhash_2words((__force __u32) laddr ^ (__force __u32) faddr, | 178 | return jhash_3words((__force __u32) laddr, |
179 | (__force __u32) faddr, | ||
179 | ((__u32) lport) << 16 | (__force __u32)fport, | 180 | ((__u32) lport) << 16 | (__force __u32)fport, |
180 | inet_ehash_secret); | 181 | inet_ehash_secret); |
181 | } | 182 | } |