summaryrefslogtreecommitdiff
path: root/net/802/tr.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-09-26 21:23:16 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2006-09-28 17:53:59 -0700
commit0ac0760a57a6b1eb75c21a590e578be5dfc2f88b (patch)
tree397d0458d430251a80c2d55716639e14f5b96f3f /net/802/tr.c
parent2a50f28c326d20ab4556be1b867ecddf6aefbb88 (diff)
[TR]: endiannness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/802/tr.c')
-rw-r--r--net/802/tr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/802/tr.c b/net/802/tr.c
index d7d8f40c4fe..829deb41ce8 100644
--- a/net/802/tr.c
+++ b/net/802/tr.c
@@ -164,7 +164,7 @@ static int tr_rebuild_header(struct sk_buff *skb)
*/
if(trllc->ethertype != htons(ETH_P_IP)) {
- printk("tr_rebuild_header: Don't know how to resolve type %04X addresses ?\n",(unsigned int)htons(trllc->ethertype));
+ printk("tr_rebuild_header: Don't know how to resolve type %04X addresses ?\n", ntohs(trllc->ethertype));
return 0;
}
@@ -186,7 +186,7 @@ static int tr_rebuild_header(struct sk_buff *skb)
* it via SNAP.
*/
-unsigned short tr_type_trans(struct sk_buff *skb, struct net_device *dev)
+__be16 tr_type_trans(struct sk_buff *skb, struct net_device *dev)
{
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)
*/
if (trllc->dsap == EXTENDED_SAP &&
- (trllc->ethertype == ntohs(ETH_P_IP) ||
- trllc->ethertype == ntohs(ETH_P_IPV6) ||
- trllc->ethertype == ntohs(ETH_P_ARP)))
+ (trllc->ethertype == htons(ETH_P_IP) ||
+ trllc->ethertype == htons(ETH_P_IPV6) ||
+ trllc->ethertype == htons(ETH_P_ARP)))
{
skb_pull(skb, sizeof(struct trllc));
return trllc->ethertype;
}
- return ntohs(ETH_P_TR_802_2);
+ return htons(ETH_P_TR_802_2);
}
/*