X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=net%2F802%2Ftr.c;h=829deb41ce81d436aad10567d03d35ca86532b58;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=afd8385c0c9c319bff792f714cc3326881db95d9;hpb=76828883507a47dae78837ab5dec5a5b4513c667;p=linux-2.6.git diff --git a/net/802/tr.c b/net/802/tr.c index afd8385c0..829deb41c 100644 --- a/net/802/tr.c +++ b/net/802/tr.c @@ -17,7 +17,6 @@ #include #include -#include #include #include #include @@ -165,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; } @@ -187,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; @@ -230,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); } /* @@ -643,6 +642,5 @@ static int __init rif_init(void) module_init(rif_init); -EXPORT_SYMBOL(tr_source_route); EXPORT_SYMBOL(tr_type_trans); EXPORT_SYMBOL(alloc_trdev);