diff options
Diffstat (limited to 'net/802')
-rw-r--r-- | net/802/fddi.c | 7 | ||||
-rw-r--r-- | net/802/hippi.c | 12 | ||||
-rw-r--r-- | net/802/psnap.c | 4 | ||||
-rw-r--r-- | net/802/tr.c | 9 |
4 files changed, 18 insertions, 14 deletions
diff --git a/net/802/fddi.c b/net/802/fddi.c index ace6386384bc..91dde41b5481 100644 --- a/net/802/fddi.c +++ b/net/802/fddi.c | |||
@@ -100,7 +100,7 @@ static int fddi_rebuild_header(struct sk_buff *skb) | |||
100 | struct fddihdr *fddi = (struct fddihdr *)skb->data; | 100 | struct fddihdr *fddi = (struct fddihdr *)skb->data; |
101 | 101 | ||
102 | #ifdef CONFIG_INET | 102 | #ifdef CONFIG_INET |
103 | if (fddi->hdr.llc_snap.ethertype == __constant_htons(ETH_P_IP)) | 103 | if (fddi->hdr.llc_snap.ethertype == htons(ETH_P_IP)) |
104 | /* Try to get ARP to resolve the header and fill destination address */ | 104 | /* Try to get ARP to resolve the header and fill destination address */ |
105 | return arp_find(fddi->daddr, skb); | 105 | return arp_find(fddi->daddr, skb); |
106 | else | 106 | else |
@@ -130,12 +130,13 @@ __be16 fddi_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
130 | * to start of packet data. Assume 802.2 SNAP frames for now. | 130 | * to start of packet data. Assume 802.2 SNAP frames for now. |
131 | */ | 131 | */ |
132 | 132 | ||
133 | skb->mac.raw = skb->data; /* point to frame control (FC) */ | 133 | skb->dev = dev; |
134 | skb_reset_mac_header(skb); /* point to frame control (FC) */ | ||
134 | 135 | ||
135 | if(fddi->hdr.llc_8022_1.dsap==0xe0) | 136 | if(fddi->hdr.llc_8022_1.dsap==0xe0) |
136 | { | 137 | { |
137 | skb_pull(skb, FDDI_K_8022_HLEN-3); | 138 | skb_pull(skb, FDDI_K_8022_HLEN-3); |
138 | type = __constant_htons(ETH_P_802_2); | 139 | type = htons(ETH_P_802_2); |
139 | } | 140 | } |
140 | else | 141 | else |
141 | { | 142 | { |
diff --git a/net/802/hippi.c b/net/802/hippi.c index 578f2a3d692d..87ffc12b6891 100644 --- a/net/802/hippi.c +++ b/net/802/hippi.c | |||
@@ -60,7 +60,7 @@ static int hippi_header(struct sk_buff *skb, struct net_device *dev, | |||
60 | * Due to the stupidity of the little endian byte-order we | 60 | * Due to the stupidity of the little endian byte-order we |
61 | * have to set the fp field this way. | 61 | * have to set the fp field this way. |
62 | */ | 62 | */ |
63 | hip->fp.fixed = __constant_htonl(0x04800018); | 63 | hip->fp.fixed = htonl(0x04800018); |
64 | hip->fp.d2_size = htonl(len + 8); | 64 | hip->fp.d2_size = htonl(len + 8); |
65 | hip->le.fc = 0; | 65 | hip->le.fc = 0; |
66 | hip->le.double_wide = 0; /* only HIPPI 800 for the time being */ | 66 | hip->le.double_wide = 0; /* only HIPPI 800 for the time being */ |
@@ -104,7 +104,7 @@ static int hippi_rebuild_header(struct sk_buff *skb) | |||
104 | * Only IP is currently supported | 104 | * Only IP is currently supported |
105 | */ | 105 | */ |
106 | 106 | ||
107 | if(hip->snap.ethertype != __constant_htons(ETH_P_IP)) | 107 | if(hip->snap.ethertype != htons(ETH_P_IP)) |
108 | { | 108 | { |
109 | printk(KERN_DEBUG "%s: unable to resolve type %X addresses.\n",skb->dev->name,ntohs(hip->snap.ethertype)); | 109 | printk(KERN_DEBUG "%s: unable to resolve type %X addresses.\n",skb->dev->name,ntohs(hip->snap.ethertype)); |
110 | return 0; | 110 | return 0; |
@@ -126,14 +126,14 @@ __be16 hippi_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
126 | { | 126 | { |
127 | struct hippi_hdr *hip; | 127 | struct hippi_hdr *hip; |
128 | 128 | ||
129 | hip = (struct hippi_hdr *) skb->data; | ||
130 | |||
131 | /* | 129 | /* |
132 | * This is actually wrong ... question is if we really should | 130 | * This is actually wrong ... question is if we really should |
133 | * set the raw address here. | 131 | * set the raw address here. |
134 | */ | 132 | */ |
135 | skb->mac.raw = skb->data; | 133 | skb->dev = dev; |
136 | skb_pull(skb, HIPPI_HLEN); | 134 | skb_reset_mac_header(skb); |
135 | hip = (struct hippi_hdr *)skb_mac_header(skb); | ||
136 | skb_pull(skb, HIPPI_HLEN); | ||
137 | 137 | ||
138 | /* | 138 | /* |
139 | * No fancy promisc stuff here now. | 139 | * No fancy promisc stuff here now. |
diff --git a/net/802/psnap.c b/net/802/psnap.c index 6e7c2120b83f..04ee43e7538f 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
@@ -56,10 +56,10 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | |||
56 | }; | 56 | }; |
57 | 57 | ||
58 | rcu_read_lock(); | 58 | rcu_read_lock(); |
59 | proto = find_snap_client(skb->h.raw); | 59 | proto = find_snap_client(skb_transport_header(skb)); |
60 | if (proto) { | 60 | if (proto) { |
61 | /* Pass the frame on. */ | 61 | /* Pass the frame on. */ |
62 | skb->h.raw += 5; | 62 | skb->transport_header += 5; |
63 | skb_pull_rcsum(skb, 5); | 63 | skb_pull_rcsum(skb, 5); |
64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); | 64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); |
65 | } else { | 65 | } else { |
diff --git a/net/802/tr.c b/net/802/tr.c index 96bd14452c55..0ba1946211c9 100644 --- a/net/802/tr.c +++ b/net/802/tr.c | |||
@@ -189,11 +189,13 @@ static int tr_rebuild_header(struct sk_buff *skb) | |||
189 | __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev) | 189 | __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev) |
190 | { | 190 | { |
191 | 191 | ||
192 | struct trh_hdr *trh=(struct trh_hdr *)skb->data; | 192 | struct trh_hdr *trh; |
193 | struct trllc *trllc; | 193 | struct trllc *trllc; |
194 | unsigned riflen=0; | 194 | unsigned riflen=0; |
195 | 195 | ||
196 | skb->mac.raw = skb->data; | 196 | skb->dev = dev; |
197 | skb_reset_mac_header(skb); | ||
198 | trh = tr_hdr(skb); | ||
197 | 199 | ||
198 | if(trh->saddr[0] & TR_RII) | 200 | if(trh->saddr[0] & TR_RII) |
199 | riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8; | 201 | riflen = (ntohs(trh->rcf) & TR_RCF_LEN_MASK) >> 8; |
@@ -552,7 +554,8 @@ static int rif_seq_show(struct seq_file *seq, void *v) | |||
552 | if(j==1) { | 554 | if(j==1) { |
553 | segment=ntohs(entry->rseg[j-1])>>4; | 555 | segment=ntohs(entry->rseg[j-1])>>4; |
554 | seq_printf(seq," %03X",segment); | 556 | seq_printf(seq," %03X",segment); |
555 | }; | 557 | } |
558 | |||
556 | segment=ntohs(entry->rseg[j])>>4; | 559 | segment=ntohs(entry->rseg[j])>>4; |
557 | brdgnmb=ntohs(entry->rseg[j-1])&0x00f; | 560 | brdgnmb=ntohs(entry->rseg[j-1])&0x00f; |
558 | seq_printf(seq,"-%01X-%03X",brdgnmb,segment); | 561 | seq_printf(seq,"-%01X-%03X",brdgnmb,segment); |