diff options
Diffstat (limited to 'net/802/fddi.c')
-rw-r--r-- | net/802/fddi.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/net/802/fddi.c b/net/802/fddi.c index 797c6d961deb..0b98fe2fa2f6 100644 --- a/net/802/fddi.c +++ b/net/802/fddi.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * Mark Evans, <evansmp@uhura.aston.ac.uk> | 15 | * Mark Evans, <evansmp@uhura.aston.ac.uk> |
16 | * Florian La Roche, <rzsfl@rz.uni-sb.de> | 16 | * Florian La Roche, <rzsfl@rz.uni-sb.de> |
17 | * Alan Cox, <gw4pts@gw4pts.ampr.org> | 17 | * Alan Cox, <gw4pts@gw4pts.ampr.org> |
18 | * | 18 | * |
19 | * This program is free software; you can redistribute it and/or | 19 | * This program is free software; you can redistribute it and/or |
20 | * modify it under the terms of the GNU General Public License | 20 | * modify it under the terms of the GNU General Public License |
21 | * as published by the Free Software Foundation; either version | 21 | * as published by the Free Software Foundation; either version |
@@ -25,7 +25,7 @@ | |||
25 | * Alan Cox : New arp/rebuild header | 25 | * Alan Cox : New arp/rebuild header |
26 | * Maciej W. Rozycki : IPv6 support | 26 | * Maciej W. Rozycki : IPv6 support |
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <linux/module.h> | 29 | #include <linux/module.h> |
30 | #include <asm/system.h> | 30 | #include <asm/system.h> |
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
@@ -57,7 +57,7 @@ static int fddi_header(struct sk_buff *skb, struct net_device *dev, | |||
57 | { | 57 | { |
58 | int hl = FDDI_K_SNAP_HLEN; | 58 | int hl = FDDI_K_SNAP_HLEN; |
59 | struct fddihdr *fddi; | 59 | struct fddihdr *fddi; |
60 | 60 | ||
61 | if(type != ETH_P_IP && type != ETH_P_IPV6 && type != ETH_P_ARP) | 61 | if(type != ETH_P_IP && type != ETH_P_IPV6 && type != ETH_P_ARP) |
62 | hl=FDDI_K_8022_HLEN-3; | 62 | hl=FDDI_K_8022_HLEN-3; |
63 | fddi = (struct fddihdr *)skb_push(skb, hl); | 63 | fddi = (struct fddihdr *)skb_push(skb, hl); |
@@ -74,7 +74,7 @@ static int fddi_header(struct sk_buff *skb, struct net_device *dev, | |||
74 | } | 74 | } |
75 | 75 | ||
76 | /* Set the source and destination hardware addresses */ | 76 | /* Set the source and destination hardware addresses */ |
77 | 77 | ||
78 | if (saddr != NULL) | 78 | if (saddr != NULL) |
79 | memcpy(fddi->saddr, saddr, dev->addr_len); | 79 | memcpy(fddi->saddr, saddr, dev->addr_len); |
80 | else | 80 | else |
@@ -95,7 +95,7 @@ static int fddi_header(struct sk_buff *skb, struct net_device *dev, | |||
95 | * (or in future other address resolution) has completed on | 95 | * (or in future other address resolution) has completed on |
96 | * this sk_buff. We now let ARP fill in the other fields. | 96 | * this sk_buff. We now let ARP fill in the other fields. |
97 | */ | 97 | */ |
98 | 98 | ||
99 | static int fddi_rebuild_header(struct sk_buff *skb) | 99 | static int fddi_rebuild_header(struct sk_buff *skb) |
100 | { | 100 | { |
101 | struct fddihdr *fddi = (struct fddihdr *)skb->data; | 101 | struct fddihdr *fddi = (struct fddihdr *)skb->data; |
@@ -105,7 +105,7 @@ static int fddi_rebuild_header(struct sk_buff *skb) | |||
105 | /* Try to get ARP to resolve the header and fill destination address */ | 105 | /* Try to get ARP to resolve the header and fill destination address */ |
106 | return arp_find(fddi->daddr, skb); | 106 | return arp_find(fddi->daddr, skb); |
107 | else | 107 | else |
108 | #endif | 108 | #endif |
109 | { | 109 | { |
110 | printk("%s: Don't know how to resolve type %04X addresses.\n", | 110 | printk("%s: Don't know how to resolve type %04X addresses.\n", |
111 | skb->dev->name, ntohs(fddi->hdr.llc_snap.ethertype)); | 111 | skb->dev->name, ntohs(fddi->hdr.llc_snap.ethertype)); |
@@ -120,19 +120,19 @@ static int fddi_rebuild_header(struct sk_buff *skb) | |||
120 | * up. It's used to fill in specific skb fields and to set | 120 | * up. It's used to fill in specific skb fields and to set |
121 | * the proper pointer to the start of packet data (skb->data). | 121 | * the proper pointer to the start of packet data (skb->data). |
122 | */ | 122 | */ |
123 | 123 | ||
124 | __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) | 124 | __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) |
125 | { | 125 | { |
126 | struct fddihdr *fddi = (struct fddihdr *)skb->data; | 126 | struct fddihdr *fddi = (struct fddihdr *)skb->data; |
127 | __be16 type; | 127 | __be16 type; |
128 | 128 | ||
129 | /* | 129 | /* |
130 | * Set mac.raw field to point to FC byte, set data field to point | 130 | * Set mac.raw field to point to FC byte, set data field to point |
131 | * to start of packet data. Assume 802.2 SNAP frames for now. | 131 | * to start of packet data. Assume 802.2 SNAP frames for now. |
132 | */ | 132 | */ |
133 | 133 | ||
134 | skb->mac.raw = skb->data; /* point to frame control (FC) */ | 134 | skb->mac.raw = skb->data; /* point to frame control (FC) */ |
135 | 135 | ||
136 | if(fddi->hdr.llc_8022_1.dsap==0xe0) | 136 | if(fddi->hdr.llc_8022_1.dsap==0xe0) |
137 | { | 137 | { |
138 | skb_pull(skb, FDDI_K_8022_HLEN-3); | 138 | skb_pull(skb, FDDI_K_8022_HLEN-3); |
@@ -143,9 +143,9 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
143 | skb_pull(skb, FDDI_K_SNAP_HLEN); /* adjust for 21 byte header */ | 143 | skb_pull(skb, FDDI_K_SNAP_HLEN); /* adjust for 21 byte header */ |
144 | type=fddi->hdr.llc_snap.ethertype; | 144 | type=fddi->hdr.llc_snap.ethertype; |
145 | } | 145 | } |
146 | 146 | ||
147 | /* Set packet type based on destination address and flag settings */ | 147 | /* Set packet type based on destination address and flag settings */ |
148 | 148 | ||
149 | if (*fddi->daddr & 0x01) | 149 | if (*fddi->daddr & 0x01) |
150 | { | 150 | { |
151 | if (memcmp(fddi->daddr, dev->broadcast, FDDI_K_ALEN) == 0) | 151 | if (memcmp(fddi->daddr, dev->broadcast, FDDI_K_ALEN) == 0) |
@@ -153,7 +153,7 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
153 | else | 153 | else |
154 | skb->pkt_type = PACKET_MULTICAST; | 154 | skb->pkt_type = PACKET_MULTICAST; |
155 | } | 155 | } |
156 | 156 | ||
157 | else if (dev->flags & IFF_PROMISC) | 157 | else if (dev->flags & IFF_PROMISC) |
158 | { | 158 | { |
159 | if (memcmp(fddi->daddr, dev->dev_addr, FDDI_K_ALEN)) | 159 | if (memcmp(fddi->daddr, dev->dev_addr, FDDI_K_ALEN)) |
@@ -187,7 +187,7 @@ static void fddi_setup(struct net_device *dev) | |||
187 | dev->addr_len = FDDI_K_ALEN; | 187 | dev->addr_len = FDDI_K_ALEN; |
188 | dev->tx_queue_len = 100; /* Long queues on FDDI */ | 188 | dev->tx_queue_len = 100; /* Long queues on FDDI */ |
189 | dev->flags = IFF_BROADCAST | IFF_MULTICAST; | 189 | dev->flags = IFF_BROADCAST | IFF_MULTICAST; |
190 | 190 | ||
191 | memset(dev->broadcast, 0xFF, FDDI_K_ALEN); | 191 | memset(dev->broadcast, 0xFF, FDDI_K_ALEN); |
192 | } | 192 | } |
193 | 193 | ||