aboutsummaryrefslogtreecommitdiffstats
path: root/net/802/fc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
commitcb18eccff48ef3986d1072964590bce6fec705fb (patch)
tree777fb1d15e0281341e1e02c9803d989538d346f2 /net/802/fc.c
parentc827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff)
parent5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits) [IPV4]: Restore multipath routing after rt_next changes. [XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch. [NET]: Reorder fields of struct dst_entry [DECNET]: Convert decnet route to use the new dst_entry 'next' pointer [IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer [IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer [NET]: Introduce union in struct dst_entry to hold 'next' pointer [DECNET]: fix misannotation of linkinfo_dn [DECNET]: FRA_{DST,SRC} are le16 for decnet [UDP]: UDP can use sk_hash to speedup lookups [NET]: Fix whitespace errors. [NET] XFRM: Fix whitespace errors. [NET] X25: Fix whitespace errors. [NET] WANROUTER: Fix whitespace errors. [NET] UNIX: Fix whitespace errors. [NET] TIPC: Fix whitespace errors. [NET] SUNRPC: Fix whitespace errors. [NET] SCTP: Fix whitespace errors. [NET] SCHED: Fix whitespace errors. [NET] RXRPC: Fix whitespace errors. ...
Diffstat (limited to 'net/802/fc.c')
-rw-r--r--net/802/fc.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/net/802/fc.c b/net/802/fc.c
index 2a27e37bc4cb..d64e6a502958 100644
--- a/net/802/fc.c
+++ b/net/802/fc.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * NET3: Fibre Channel device handling subroutines 2 * NET3: Fibre Channel device handling subroutines
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 6 * as published by the Free Software Foundation; either version
@@ -31,18 +31,18 @@
31#include <net/arp.h> 31#include <net/arp.h>
32 32
33/* 33/*
34 * Put the headers on a Fibre Channel packet. 34 * Put the headers on a Fibre Channel packet.
35 */ 35 */
36 36
37static int fc_header(struct sk_buff *skb, struct net_device *dev, 37static int fc_header(struct sk_buff *skb, struct net_device *dev,
38 unsigned short type, 38 unsigned short type,
39 void *daddr, void *saddr, unsigned len) 39 void *daddr, void *saddr, unsigned len)
40{ 40{
41 struct fch_hdr *fch; 41 struct fch_hdr *fch;
42 int hdr_len; 42 int hdr_len;
43 43
44 /* 44 /*
45 * Add the 802.2 SNAP header if IP as the IPv4 code calls 45 * Add the 802.2 SNAP header if IP as the IPv4 code calls
46 * dev->hard_header directly. 46 * dev->hard_header directly.
47 */ 47 */
48 if (type == ETH_P_IP || type == ETH_P_ARP) 48 if (type == ETH_P_IP || type == ETH_P_ARP)
@@ -60,7 +60,7 @@ static int fc_header(struct sk_buff *skb, struct net_device *dev,
60 else 60 else
61 { 61 {
62 hdr_len = sizeof(struct fch_hdr); 62 hdr_len = sizeof(struct fch_hdr);
63 fch = (struct fch_hdr *)skb_push(skb, hdr_len); 63 fch = (struct fch_hdr *)skb_push(skb, hdr_len);
64 } 64 }
65 65
66 if(saddr) 66 if(saddr)
@@ -68,20 +68,20 @@ static int fc_header(struct sk_buff *skb, struct net_device *dev,
68 else 68 else
69 memcpy(fch->saddr,dev->dev_addr,dev->addr_len); 69 memcpy(fch->saddr,dev->dev_addr,dev->addr_len);
70 70
71 if(daddr) 71 if(daddr)
72 { 72 {
73 memcpy(fch->daddr,daddr,dev->addr_len); 73 memcpy(fch->daddr,daddr,dev->addr_len);
74 return(hdr_len); 74 return(hdr_len);
75 } 75 }
76 return -hdr_len; 76 return -hdr_len;
77} 77}
78 78
79/* 79/*
80 * A neighbour discovery of some species (eg arp) has completed. We 80 * A neighbour discovery of some species (eg arp) has completed. We
81 * can now send the packet. 81 * can now send the packet.
82 */ 82 */
83 83
84static int fc_rebuild_header(struct sk_buff *skb) 84static int fc_rebuild_header(struct sk_buff *skb)
85{ 85{
86 struct fch_hdr *fch=(struct fch_hdr *)skb->data; 86 struct fch_hdr *fch=(struct fch_hdr *)skb->data;
87 struct fcllc *fcllc=(struct fcllc *)(skb->data+sizeof(struct fch_hdr)); 87 struct fcllc *fcllc=(struct fcllc *)(skb->data+sizeof(struct fch_hdr));
@@ -100,7 +100,7 @@ static void fc_setup(struct net_device *dev)
100{ 100{
101 dev->hard_header = fc_header; 101 dev->hard_header = fc_header;
102 dev->rebuild_header = fc_rebuild_header; 102 dev->rebuild_header = fc_rebuild_header;
103 103
104 dev->type = ARPHRD_IEEE802; 104 dev->type = ARPHRD_IEEE802;
105 dev->hard_header_len = FC_HLEN; 105 dev->hard_header_len = FC_HLEN;
106 dev->mtu = 2024; 106 dev->mtu = 2024;