diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:27:41 -0500 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-04 19:27:41 -0500 |
| commit | d347da0deffa1d8f88f0d270eab040e4707c9916 (patch) | |
| tree | e0911f2ef4d36a7b44f7a5379feabebbd37dcfc4 /drivers/net | |
| parent | c6c88bbde4d8b2ffe9886b7130b2e23781d424e5 (diff) | |
| parent | 74cb8798222bb7d1aecb0acb91e6eeedf5feb948 (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/ns83820.c | 1 | ||||
| -rw-r--r-- | drivers/net/pppoe.c | 31 | ||||
| -rw-r--r-- | drivers/net/pppox.c | 10 | ||||
| -rw-r--r-- | drivers/net/sk98lin/skge.c | 1 | ||||
| -rw-r--r-- | drivers/net/skge.c | 1 | ||||
| -rw-r--r-- | drivers/net/tg3.c | 3 | ||||
| -rw-r--r-- | drivers/net/wireless/ipw2200.c | 15 |
7 files changed, 19 insertions, 43 deletions
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) | |||
| 85 | static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb); | 85 | static int pppoe_xmit(struct ppp_channel *chan, struct sk_buff *skb); |
| 86 | static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb); | 86 | static int __pppoe_xmit(struct sock *sk, struct sk_buff *skb); |
| 87 | 87 | ||
| 88 | static struct proto_ops pppoe_ops; | 88 | static const struct proto_ops pppoe_ops; |
| 89 | static DEFINE_RWLOCK(pppoe_hash_lock); | 89 | static DEFINE_RWLOCK(pppoe_hash_lock); |
| 90 | 90 | ||
| 91 | static struct ppp_channel_ops pppoe_chan_ops; | 91 | static 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; | ||
| 416 | drop: | 398 | drop: |
| 417 | kfree_skb(skb); | 399 | kfree_skb(skb); |
| 418 | out: | 400 | out: |
| @@ -1081,9 +1063,7 @@ static int __init pppoe_proc_init(void) | |||
| 1081 | static inline int pppoe_proc_init(void) { return 0; } | 1063 | static 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 */ | 1066 | static const struct proto_ops pppoe_ops = { |
| 1085 | |||
| 1086 | static 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 | ||
| 1105 | static struct pppox_proto pppoe_proto = { | 1086 | static 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); | |||
| 68 | EXPORT_SYMBOL(unregister_pppox_proto); | 68 | EXPORT_SYMBOL(unregister_pppox_proto); |
| 69 | EXPORT_SYMBOL(pppox_unbind_sock); | 69 | EXPORT_SYMBOL(pppox_unbind_sock); |
| 70 | 70 | ||
| 71 | static int pppox_ioctl(struct socket* sock, unsigned int cmd, | 71 | int 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 | ||
| 107 | EXPORT_SYMBOL(pppox_ioctl); | ||
| 108 | 108 | ||
| 109 | static int pppox_create(struct socket *sock, int protocol) | 109 | static 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); |
| 128 | out: | 124 | out: |
| 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; |
