aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-27 00:23:16 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 20:53:59 -0400
commit0ac0760a57a6b1eb75c21a590e578be5dfc2f88b (patch)
tree397d0458d430251a80c2d55716639e14f5b96f3f
parent2a50f28c326d20ab4556be1b867ecddf6aefbb88 (diff)
[TR]: endiannness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/trdevice.h2
-rw-r--r--net/802/tr.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/trdevice.h b/include/linux/trdevice.h
index 99e02ef54c47..bfc84a7aecc5 100644
--- a/include/linux/trdevice.h
+++ b/include/linux/trdevice.h
@@ -28,7 +28,7 @@
28#include <linux/if_tr.h> 28#include <linux/if_tr.h>
29 29
30#ifdef __KERNEL__ 30#ifdef __KERNEL__
31extern unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev); 31extern __be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev);
32extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev); 32extern void tr_source_route(struct sk_buff *skb, struct trh_hdr *trh, struct net_device *dev);
33extern struct net_device *alloc_trdev(int sizeof_priv); 33extern struct net_device *alloc_trdev(int sizeof_priv);
34 34
diff --git a/net/802/tr.c b/net/802/tr.c
index d7d8f40c4fed..829deb41ce81 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -164,7 +164,7 @@ static int tr_rebuild_header(struct sk_buff *skb)
164 */ 164 */
165 165
166 if(trllc->ethertype != htons(ETH_P_IP)) { 166 if(trllc->ethertype != htons(ETH_P_IP)) {
167 printk("tr_rebuild_header: Don't know how to resolve type %04X addresses ?\n",(unsigned int)htons(trllc->ethertype)); 167 printk("tr_rebuild_header: Don't know how to resolve type %04X addresses ?\n", ntohs(trllc->ethertype));
168 return 0; 168 return 0;
169 } 169 }
170 170
@@ -186,7 +186,7 @@ static int tr_rebuild_header(struct sk_buff *skb)
186 * it via SNAP. 186 * it via SNAP.
187 */ 187 */
188 188
189unsigned short 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=(struct trh_hdr *)skb->data;
@@ -229,15 +229,15 @@ unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev)
229 */ 229 */
230 230
231 if (trllc->dsap == EXTENDED_SAP && 231 if (trllc->dsap == EXTENDED_SAP &&
232 (trllc->ethertype == ntohs(ETH_P_IP) || 232 (trllc->ethertype == htons(ETH_P_IP) ||
233 trllc->ethertype == ntohs(ETH_P_IPV6) || 233 trllc->ethertype == htons(ETH_P_IPV6) ||
234 trllc->ethertype == ntohs(ETH_P_ARP))) 234 trllc->ethertype == htons(ETH_P_ARP)))
235 { 235 {
236 skb_pull(skb, sizeof(struct trllc)); 236 skb_pull(skb, sizeof(struct trllc));
237 return trllc->ethertype; 237 return trllc->ethertype;
238 } 238 }
239 239
240 return ntohs(ETH_P_TR_802_2); 240 return htons(ETH_P_TR_802_2);
241} 241}
242 242
243/* 243/*