1515 * Mark Evans, <evansmp@uhura.aston.ac.uk>
1616 * Florian La Roche, <rzsfl@rz.uni-sb.de>
1717 * Alan Cox, <gw4pts@gw4pts.ampr.org>
18- *
18+ *
1919 * This program is free software; you can redistribute it and/or
2020 * modify it under the terms of the GNU General Public License
2121 * as published by the Free Software Foundation; either version
2525 * Alan Cox : New arp/rebuild header
2626 * Maciej W. Rozycki : IPv6 support
2727 */
28-
28+
2929#include <linux/module.h>
3030#include <asm/system.h>
3131#include <linux/types.h>
@@ -57,7 +57,7 @@ static int fddi_header(struct sk_buff *skb, struct net_device *dev,
5757{
5858 int hl = FDDI_K_SNAP_HLEN ;
5959 struct fddihdr * fddi ;
60-
60+
6161 if (type != ETH_P_IP && type != ETH_P_IPV6 && type != ETH_P_ARP )
6262 hl = FDDI_K_8022_HLEN - 3 ;
6363 fddi = (struct fddihdr * )skb_push (skb , hl );
@@ -74,7 +74,7 @@ static int fddi_header(struct sk_buff *skb, struct net_device *dev,
7474 }
7575
7676 /* Set the source and destination hardware addresses */
77-
77+
7878 if (saddr != NULL )
7979 memcpy (fddi -> saddr , saddr , dev -> addr_len );
8080 else
@@ -95,7 +95,7 @@ static int fddi_header(struct sk_buff *skb, struct net_device *dev,
9595 * (or in future other address resolution) has completed on
9696 * this sk_buff. We now let ARP fill in the other fields.
9797 */
98-
98+
9999static int fddi_rebuild_header (struct sk_buff * skb )
100100{
101101 struct fddihdr * fddi = (struct fddihdr * )skb -> data ;
@@ -105,7 +105,7 @@ static int fddi_rebuild_header(struct sk_buff *skb)
105105 /* Try to get ARP to resolve the header and fill destination address */
106106 return arp_find (fddi -> daddr , skb );
107107 else
108- #endif
108+ #endif
109109 {
110110 printk ("%s: Don't know how to resolve type %04X addresses.\n" ,
111111 skb -> dev -> name , ntohs (fddi -> hdr .llc_snap .ethertype ));
@@ -120,19 +120,19 @@ static int fddi_rebuild_header(struct sk_buff *skb)
120120 * up. It's used to fill in specific skb fields and to set
121121 * the proper pointer to the start of packet data (skb->data).
122122 */
123-
123+
124124__be16 fddi_type_trans (struct sk_buff * skb , struct net_device * dev )
125125{
126126 struct fddihdr * fddi = (struct fddihdr * )skb -> data ;
127127 __be16 type ;
128-
128+
129129 /*
130130 * Set mac.raw field to point to FC byte, set data field to point
131131 * to start of packet data. Assume 802.2 SNAP frames for now.
132132 */
133133
134134 skb -> mac .raw = skb -> data ; /* point to frame control (FC) */
135-
135+
136136 if (fddi -> hdr .llc_8022_1 .dsap == 0xe0 )
137137 {
138138 skb_pull (skb , FDDI_K_8022_HLEN - 3 );
@@ -143,17 +143,17 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev)
143143 skb_pull (skb , FDDI_K_SNAP_HLEN ); /* adjust for 21 byte header */
144144 type = fddi -> hdr .llc_snap .ethertype ;
145145 }
146-
146+
147147 /* Set packet type based on destination address and flag settings */
148-
148+
149149 if (* fddi -> daddr & 0x01 )
150150 {
151151 if (memcmp (fddi -> daddr , dev -> broadcast , FDDI_K_ALEN ) == 0 )
152152 skb -> pkt_type = PACKET_BROADCAST ;
153153 else
154154 skb -> pkt_type = PACKET_MULTICAST ;
155155 }
156-
156+
157157 else if (dev -> flags & IFF_PROMISC )
158158 {
159159 if (memcmp (fddi -> daddr , dev -> dev_addr , FDDI_K_ALEN ))
@@ -187,7 +187,7 @@ static void fddi_setup(struct net_device *dev)
187187 dev -> addr_len = FDDI_K_ALEN ;
188188 dev -> tx_queue_len = 100 ; /* Long queues on FDDI */
189189 dev -> flags = IFF_BROADCAST | IFF_MULTICAST ;
190-
190+
191191 memset (dev -> broadcast , 0xFF , FDDI_K_ALEN );
192192}
193193
0 commit comments