aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-04 19:27:41 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-04 19:27:41 -0500
commitd347da0deffa1d8f88f0d270eab040e4707c9916 (patch)
treee0911f2ef4d36a7b44f7a5379feabebbd37dcfc4 /drivers
parentc6c88bbde4d8b2ffe9886b7130b2e23781d424e5 (diff)
parent74cb8798222bb7d1aecb0acb91e6eeedf5feb948 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/random.c10
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_main.c2
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c2
-rw-r--r--drivers/net/ns83820.c1
-rw-r--r--drivers/net/pppoe.c31
-rw-r--r--drivers/net/pppox.c10
-rw-r--r--drivers/net/sk98lin/skge.c1
-rw-r--r--drivers/net/skge.c1
-rw-r--r--drivers/net/tg3.c3
-rw-r--r--drivers/net/wireless/ipw2200.c15
10 files changed, 27 insertions, 49 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 7999da25fe40..bdfdfd28594d 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -1554,10 +1554,8 @@ __u32 secure_tcp_sequence_number(__u32 saddr, __u32 daddr,
1554 1554
1555EXPORT_SYMBOL(secure_tcp_sequence_number); 1555EXPORT_SYMBOL(secure_tcp_sequence_number);
1556 1556
1557 1557/* Generate secure starting point for ephemeral IPV4 transport port search */
1558 1558u32 secure_ipv4_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport)
1559/* Generate secure starting point for ephemeral TCP port search */
1560u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport)
1561{ 1559{
1562 struct keydata *keyptr = get_keyptr(); 1560 struct keydata *keyptr = get_keyptr();
1563 u32 hash[4]; 1561 u32 hash[4];
@@ -1575,7 +1573,7 @@ u32 secure_tcp_port_ephemeral(__u32 saddr, __u32 daddr, __u16 dport)
1575} 1573}
1576 1574
1577#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 1575#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
1578u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dport) 1576u32 secure_ipv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dport)
1579{ 1577{
1580 struct keydata *keyptr = get_keyptr(); 1578 struct keydata *keyptr = get_keyptr();
1581 u32 hash[12]; 1579 u32 hash[12];
@@ -1586,7 +1584,7 @@ u32 secure_tcpv6_port_ephemeral(const __u32 *saddr, const __u32 *daddr, __u16 dp
1586 1584
1587 return twothirdsMD4Transform(daddr, hash); 1585 return twothirdsMD4Transform(daddr, hash);
1588} 1586}
1589EXPORT_SYMBOL(secure_tcpv6_port_ephemeral); 1587EXPORT_SYMBOL(secure_ipv6_port_ephemeral);
1590#endif 1588#endif
1591 1589
1592#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE) 1590#if defined(CONFIG_IP_DCCP) || defined(CONFIG_IP_DCCP_MODULE)
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 475d98fa9e26..780009c7eaa6 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -47,6 +47,8 @@
47#include <linux/ip.h> 47#include <linux/ip.h>
48#include <linux/in.h> 48#include <linux/in.h>
49 49
50#include <net/dst.h>
51
50MODULE_AUTHOR("Roland Dreier"); 52MODULE_AUTHOR("Roland Dreier");
51MODULE_DESCRIPTION("IP-over-InfiniBand net driver"); 53MODULE_DESCRIPTION("IP-over-InfiniBand net driver");
52MODULE_LICENSE("Dual BSD/GPL"); 54MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index ef3ee035bbc8..ed0c2ead8bc1 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -43,6 +43,8 @@
43#include <linux/delay.h> 43#include <linux/delay.h>
44#include <linux/completion.h> 44#include <linux/completion.h>
45 45
46#include <net/dst.h>
47
46#include "ipoib.h" 48#include "ipoib.h"
47 49
48#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG 50#ifdef CONFIG_INFINIBAND_IPOIB_DEBUG
diff --git a/drivers/net/ns83820.c b/drivers/net/ns83820.c
index f857ae94d261..b0c3b6ab6263 100644
--- a/drivers/net/ns83820.c
+++ b/drivers/net/ns83820.c
@@ -115,6 +115,7 @@
115#include <linux/ethtool.h> 115#include <linux/ethtool.h>
116#include <linux/timer.h> 116#include <linux/timer.h>
117#include <linux/if_vlan.h> 117#include <linux/if_vlan.h>
118#include <linux/rtnetlink.h>
118 119
119#include <asm/io.h> 120#include <asm/io.h>
120#include <asm/uaccess.h> 121#include <asm/uaccess.h>
diff --git a/drivers/net/pppoe.c b/drivers/net/pppoe.c
index a842ecc60a34..9369f811075d 100644
--- a/drivers/net/pppoe.c
+++ b/drivers/net/pppoe.c
@@ -85,7 +85,7 @@ static int pppoe_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
85static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb); 85static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb);
86static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb); 86static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb);
87 87
88static struct proto_ops pppoe_ops; 88static const struct proto_ops pppoe_ops;
89static DEFINE_RWLOCK(pppoe_hash_lock); 89static DEFINE_RWLOCK(pppoe_hash_lock);
90 90
91static struct ppp_channel_ops pppoe_chan_ops; 91static struct ppp_channel_ops pppoe_chan_ops;
@@ -383,8 +383,6 @@ static int pppoe_rcv(struct sk_buff *skb,
383{ 383{
384 struct pppoe_hdr *ph; 384 struct pppoe_hdr *ph;
385 struct pppox_sock *po; 385 struct pppox_sock *po;
386 struct sock *sk;
387 int ret;
388 386
389 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr))) 387 if (!pskb_may_pull(skb, sizeof(struct pppoe_hdr)))
390 goto drop; 388 goto drop;
@@ -395,24 +393,8 @@ static int pppoe_rcv(struct sk_buff *skb,
395 ph = (struct pppoe_hdr *) skb->nh.raw; 393 ph = (struct pppoe_hdr *) skb->nh.raw;
396 394
397 po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source); 395 po = get_item((unsigned long) ph->sid, eth_hdr(skb)->h_source);
398 if (!po) 396 if (po != NULL)
399 goto drop; 397 return sk_receive_skb(sk_pppox(po), skb);
400
401 sk = sk_pppox(po);
402 bh_lock_sock(sk);
403
404 /* Socket state is unknown, must put skb into backlog. */
405 if (sock_owned_by_user(sk) != 0) {
406 sk_add_backlog(sk, skb);
407 ret = NET_RX_SUCCESS;
408 } else {
409 ret = pppoe_rcv_core(sk, skb);
410 }
411
412 bh_unlock_sock(sk);
413 sock_put(sk);
414
415 return ret;
416drop: 398drop:
417 kfree_skb(skb); 399 kfree_skb(skb);
418out: 400out:
@@ -1081,9 +1063,7 @@ static int __init pppoe_proc_init(void)
1081static inline int pppoe_proc_init(void) { return 0; } 1063static inline int pppoe_proc_init(void) { return 0; }
1082#endif /* CONFIG_PROC_FS */ 1064#endif /* CONFIG_PROC_FS */
1083 1065
1084/* ->ioctl are set at pppox_create */ 1066static const struct proto_ops pppoe_ops = {
1085
1086static struct proto_ops pppoe_ops = {
1087 .family = AF_PPPOX, 1067 .family = AF_PPPOX,
1088 .owner = THIS_MODULE, 1068 .owner = THIS_MODULE,
1089 .release = pppoe_release, 1069 .release = pppoe_release,
@@ -1099,7 +1079,8 @@ static struct proto_ops pppoe_ops = {
1099 .getsockopt = sock_no_getsockopt, 1079 .getsockopt = sock_no_getsockopt,
1100 .sendmsg = pppoe_sendmsg, 1080 .sendmsg = pppoe_sendmsg,
1101 .recvmsg = pppoe_recvmsg, 1081 .recvmsg = pppoe_recvmsg,
1102 .mmap = sock_no_mmap 1082 .mmap = sock_no_mmap,
1083 .ioctl = pppox_ioctl,
1103}; 1084};
1104 1085
1105static struct pppox_proto pppoe_proto = { 1086static struct pppox_proto pppoe_proto = {
diff --git a/drivers/net/pppox.c b/drivers/net/pppox.c
index 0c1e114527fb..9315046b3f55 100644
--- a/drivers/net/pppox.c
+++ b/drivers/net/pppox.c
@@ -68,8 +68,7 @@ EXPORT_SYMBOL(register_pppox_proto);
68EXPORT_SYMBOL(unregister_pppox_proto); 68EXPORT_SYMBOL(unregister_pppox_proto);
69EXPORT_SYMBOL(pppox_unbind_sock); 69EXPORT_SYMBOL(pppox_unbind_sock);
70 70
71static int pppox_ioctl(struct socket* sock, unsigned int cmd, 71int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
72 unsigned long arg)
73{ 72{
74 struct sock *sk = sock->sk; 73 struct sock *sk = sock->sk;
75 struct pppox_sock *po = pppox_sk(sk); 74 struct pppox_sock *po = pppox_sk(sk);
@@ -105,6 +104,7 @@ static int pppox_ioctl(struct socket* sock, unsigned int cmd,
105 return rc; 104 return rc;
106} 105}
107 106
107EXPORT_SYMBOL(pppox_ioctl);
108 108
109static int pppox_create(struct socket *sock, int protocol) 109static int pppox_create(struct socket *sock, int protocol)
110{ 110{
@@ -119,11 +119,7 @@ static int pppox_create(struct socket *sock, int protocol)
119 goto out; 119 goto out;
120 120
121 rc = pppox_protos[protocol]->create(sock); 121 rc = pppox_protos[protocol]->create(sock);
122 if (!rc) { 122
123 /* We get to set the ioctl handler. */
124 /* For everything else, pppox is just a shell. */
125 sock->ops->ioctl = pppox_ioctl;
126 }
127 module_put(pppox_protos[protocol]->owner); 123 module_put(pppox_protos[protocol]->owner);
128out: 124out:
129 return rc; 125 return rc;
diff --git a/drivers/net/sk98lin/skge.c b/drivers/net/sk98lin/skge.c
index ae7343934758..e1a2d52cc1fe 100644
--- a/drivers/net/sk98lin/skge.c
+++ b/drivers/net/sk98lin/skge.c
@@ -107,6 +107,7 @@
107 107
108#include "h/skversion.h" 108#include "h/skversion.h"
109 109
110#include <linux/in.h>
110#include <linux/module.h> 111#include <linux/module.h>
111#include <linux/moduleparam.h> 112#include <linux/moduleparam.h>
112#include <linux/init.h> 113#include <linux/init.h>
diff --git a/drivers/net/skge.c b/drivers/net/skge.c
index 00d683063c01..d8cc3aea032a 100644
--- a/drivers/net/skge.c
+++ b/drivers/net/skge.c
@@ -25,6 +25,7 @@
25 */ 25 */
26 26
27#include <linux/config.h> 27#include <linux/config.h>
28#include <linux/in.h>
28#include <linux/kernel.h> 29#include <linux/kernel.h>
29#include <linux/module.h> 30#include <linux/module.h>
30#include <linux/moduleparam.h> 31#include <linux/moduleparam.h>
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 2fc9893d69e1..eb86b059809b 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -24,6 +24,7 @@
24#include <linux/compiler.h> 24#include <linux/compiler.h>
25#include <linux/slab.h> 25#include <linux/slab.h>
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/in.h>
27#include <linux/init.h> 28#include <linux/init.h>
28#include <linux/ioport.h> 29#include <linux/ioport.h>
29#include <linux/pci.h> 30#include <linux/pci.h>
@@ -3650,7 +3651,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
3650 TXD_FLAG_CPU_POST_DMA); 3651 TXD_FLAG_CPU_POST_DMA);
3651 3652
3652 skb->nh.iph->check = 0; 3653 skb->nh.iph->check = 0;
3653 skb->nh.iph->tot_len = ntohs(mss + ip_tcp_len + tcp_opt_len); 3654 skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len);
3654 if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) { 3655 if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) {
3655 skb->h.th->check = 0; 3656 skb->h.th->check = 0;
3656 base_flags &= ~TXD_FLAG_TCPUDP_CSUM; 3657 base_flags &= ~TXD_FLAG_TCPUDP_CSUM;
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 5e7c7e944c9d..64f6d1f25753 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -7456,8 +7456,7 @@ static void ipw_handle_data_packet(struct ipw_priv *priv,
7456 /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */ 7456 /* HW decrypt will not clear the WEP bit, MIC, PN, etc. */
7457 hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data; 7457 hdr = (struct ieee80211_hdr_4addr *)rxb->skb->data;
7458 if (priv->ieee->iw_mode != IW_MODE_MONITOR && 7458 if (priv->ieee->iw_mode != IW_MODE_MONITOR &&
7459 ((is_multicast_ether_addr(hdr->addr1) || 7459 (is_multicast_ether_addr(hdr->addr1) ?
7460 is_broadcast_ether_addr(hdr->addr1)) ?
7461 !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt)) 7460 !priv->ieee->host_mc_decrypt : !priv->ieee->host_decrypt))
7462 ipw_rebuild_decrypted_skb(priv, rxb->skb); 7461 ipw_rebuild_decrypted_skb(priv, rxb->skb);
7463 7462
@@ -7648,8 +7647,7 @@ static inline int is_network_packet(struct ipw_priv *priv,
7648 return 0; 7647 return 0;
7649 7648
7650 /* {broad,multi}cast packets to our BSSID go through */ 7649 /* {broad,multi}cast packets to our BSSID go through */
7651 if (is_multicast_ether_addr(header->addr1) || 7650 if (is_multicast_ether_addr(header->addr1))
7652 is_broadcast_ether_addr(header->addr1))
7653 return !memcmp(header->addr3, priv->bssid, ETH_ALEN); 7651 return !memcmp(header->addr3, priv->bssid, ETH_ALEN);
7654 7652
7655 /* packets to our adapter go through */ 7653 /* packets to our adapter go through */
@@ -7662,8 +7660,7 @@ static inline int is_network_packet(struct ipw_priv *priv,
7662 return 0; 7660 return 0;
7663 7661
7664 /* {broad,multi}cast packets to our BSS go through */ 7662 /* {broad,multi}cast packets to our BSS go through */
7665 if (is_multicast_ether_addr(header->addr1) || 7663 if (is_multicast_ether_addr(header->addr1))
7666 is_broadcast_ether_addr(header->addr1))
7667 return !memcmp(header->addr2, priv->bssid, ETH_ALEN); 7664 return !memcmp(header->addr2, priv->bssid, ETH_ALEN);
7668 7665
7669 /* packets to our adapter go through */ 7666 /* packets to our adapter go through */
@@ -9657,8 +9654,7 @@ static inline int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
9657 switch (priv->ieee->iw_mode) { 9654 switch (priv->ieee->iw_mode) {
9658 case IW_MODE_ADHOC: 9655 case IW_MODE_ADHOC:
9659 hdr_len = IEEE80211_3ADDR_LEN; 9656 hdr_len = IEEE80211_3ADDR_LEN;
9660 unicast = !(is_multicast_ether_addr(hdr->addr1) || 9657 unicast = !is_multicast_ether_addr(hdr->addr1);
9661 is_broadcast_ether_addr(hdr->addr1));
9662 id = ipw_find_station(priv, hdr->addr1); 9658 id = ipw_find_station(priv, hdr->addr1);
9663 if (id == IPW_INVALID_STATION) { 9659 if (id == IPW_INVALID_STATION) {
9664 id = ipw_add_station(priv, hdr->addr1); 9660 id = ipw_add_station(priv, hdr->addr1);
@@ -9673,8 +9669,7 @@ static inline int ipw_tx_skb(struct ipw_priv *priv, struct ieee80211_txb *txb,
9673 9669
9674 case IW_MODE_INFRA: 9670 case IW_MODE_INFRA:
9675 default: 9671 default:
9676 unicast = !(is_multicast_ether_addr(hdr->addr3) || 9672 unicast = !is_multicast_ether_addr(hdr->addr3);
9677 is_broadcast_ether_addr(hdr->addr3));
9678 hdr_len = IEEE80211_3ADDR_LEN; 9673 hdr_len = IEEE80211_3ADDR_LEN;
9679 id = 0; 9674 id = 0;
9680 break; 9675 break;