diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-11-27 03:12:47 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-27 03:12:47 -0500 |
commit | c4106aa88a440430d387e022f2ad6dc1e0d52e98 (patch) | |
tree | 09064e6e767301ca28357ed5125e99123f5beaca /net/decnet/dn_dev.c | |
parent | 5b9ab2ec04ec1e1e53939768805612ac191d7ba2 (diff) |
decnet: remove private wrappers of endian helpers
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Reviewed-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_dev.c')
-rw-r--r-- | net/decnet/dn_dev.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 28e26bd08e24..424d86ac12fe 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c | |||
@@ -885,7 +885,7 @@ static void dn_send_endnode_hello(struct net_device *dev, struct dn_ifaddr *ifa) | |||
885 | memcpy(msg->tiver, dn_eco_version, 3); | 885 | memcpy(msg->tiver, dn_eco_version, 3); |
886 | dn_dn2eth(msg->id, ifa->ifa_local); | 886 | dn_dn2eth(msg->id, ifa->ifa_local); |
887 | msg->iinfo = DN_RT_INFO_ENDN; | 887 | msg->iinfo = DN_RT_INFO_ENDN; |
888 | msg->blksize = dn_htons(mtu2blksize(dev)); | 888 | msg->blksize = cpu_to_le16(mtu2blksize(dev)); |
889 | msg->area = 0x00; | 889 | msg->area = 0x00; |
890 | memset(msg->seed, 0, 8); | 890 | memset(msg->seed, 0, 8); |
891 | memcpy(msg->neighbor, dn_hiord, ETH_ALEN); | 891 | memcpy(msg->neighbor, dn_hiord, ETH_ALEN); |
@@ -895,13 +895,13 @@ static void dn_send_endnode_hello(struct net_device *dev, struct dn_ifaddr *ifa) | |||
895 | dn_dn2eth(msg->neighbor, dn->addr); | 895 | dn_dn2eth(msg->neighbor, dn->addr); |
896 | } | 896 | } |
897 | 897 | ||
898 | msg->timer = dn_htons((unsigned short)dn_db->parms.t3); | 898 | msg->timer = cpu_to_le16((unsigned short)dn_db->parms.t3); |
899 | msg->mpd = 0x00; | 899 | msg->mpd = 0x00; |
900 | msg->datalen = 0x02; | 900 | msg->datalen = 0x02; |
901 | memset(msg->data, 0xAA, 2); | 901 | memset(msg->data, 0xAA, 2); |
902 | 902 | ||
903 | pktlen = (__le16 *)skb_push(skb,2); | 903 | pktlen = (__le16 *)skb_push(skb,2); |
904 | *pktlen = dn_htons(skb->len - 2); | 904 | *pktlen = cpu_to_le16(skb->len - 2); |
905 | 905 | ||
906 | skb_reset_network_header(skb); | 906 | skb_reset_network_header(skb); |
907 | 907 | ||
@@ -929,7 +929,7 @@ static int dn_am_i_a_router(struct dn_neigh *dn, struct dn_dev *dn_db, struct dn | |||
929 | if (dn->priority != dn_db->parms.priority) | 929 | if (dn->priority != dn_db->parms.priority) |
930 | return 0; | 930 | return 0; |
931 | 931 | ||
932 | if (dn_ntohs(dn->addr) < dn_ntohs(ifa->ifa_local)) | 932 | if (le16_to_cpu(dn->addr) < le16_to_cpu(ifa->ifa_local)) |
933 | return 1; | 933 | return 1; |
934 | 934 | ||
935 | return 0; | 935 | return 0; |
@@ -973,11 +973,11 @@ static void dn_send_router_hello(struct net_device *dev, struct dn_ifaddr *ifa) | |||
973 | ptr += ETH_ALEN; | 973 | ptr += ETH_ALEN; |
974 | *ptr++ = dn_db->parms.forwarding == 1 ? | 974 | *ptr++ = dn_db->parms.forwarding == 1 ? |
975 | DN_RT_INFO_L1RT : DN_RT_INFO_L2RT; | 975 | DN_RT_INFO_L1RT : DN_RT_INFO_L2RT; |
976 | *((__le16 *)ptr) = dn_htons(mtu2blksize(dev)); | 976 | *((__le16 *)ptr) = cpu_to_le16(mtu2blksize(dev)); |
977 | ptr += 2; | 977 | ptr += 2; |
978 | *ptr++ = dn_db->parms.priority; /* Priority */ | 978 | *ptr++ = dn_db->parms.priority; /* Priority */ |
979 | *ptr++ = 0; /* Area: Reserved */ | 979 | *ptr++ = 0; /* Area: Reserved */ |
980 | *((__le16 *)ptr) = dn_htons((unsigned short)dn_db->parms.t3); | 980 | *((__le16 *)ptr) = cpu_to_le16((unsigned short)dn_db->parms.t3); |
981 | ptr += 2; | 981 | ptr += 2; |
982 | *ptr++ = 0; /* MPD: Reserved */ | 982 | *ptr++ = 0; /* MPD: Reserved */ |
983 | i1 = ptr++; | 983 | i1 = ptr++; |
@@ -993,7 +993,7 @@ static void dn_send_router_hello(struct net_device *dev, struct dn_ifaddr *ifa) | |||
993 | skb_trim(skb, (27 + *i2)); | 993 | skb_trim(skb, (27 + *i2)); |
994 | 994 | ||
995 | pktlen = (__le16 *)skb_push(skb, 2); | 995 | pktlen = (__le16 *)skb_push(skb, 2); |
996 | *pktlen = dn_htons(skb->len - 2); | 996 | *pktlen = cpu_to_le16(skb->len - 2); |
997 | 997 | ||
998 | skb_reset_network_header(skb); | 998 | skb_reset_network_header(skb); |
999 | 999 | ||
@@ -1401,8 +1401,8 @@ static int dn_dev_seq_show(struct seq_file *seq, void *v) | |||
1401 | mtu2blksize(dev), | 1401 | mtu2blksize(dev), |
1402 | dn_db->parms.priority, | 1402 | dn_db->parms.priority, |
1403 | dn_db->parms.state, dn_db->parms.name, | 1403 | dn_db->parms.state, dn_db->parms.name, |
1404 | dn_db->router ? dn_addr2asc(dn_ntohs(*(__le16 *)dn_db->router->primary_key), router_buf) : "", | 1404 | dn_db->router ? dn_addr2asc(le16_to_cpu(*(__le16 *)dn_db->router->primary_key), router_buf) : "", |
1405 | dn_db->peer ? dn_addr2asc(dn_ntohs(*(__le16 *)dn_db->peer->primary_key), peer_buf) : ""); | 1405 | dn_db->peer ? dn_addr2asc(le16_to_cpu(*(__le16 *)dn_db->peer->primary_key), peer_buf) : ""); |
1406 | } | 1406 | } |
1407 | return 0; | 1407 | return 0; |
1408 | } | 1408 | } |
@@ -1445,7 +1445,7 @@ void __init dn_dev_init(void) | |||
1445 | return; | 1445 | return; |
1446 | } | 1446 | } |
1447 | 1447 | ||
1448 | decnet_address = dn_htons((addr[0] << 10) | addr[1]); | 1448 | decnet_address = cpu_to_le16((addr[0] << 10) | addr[1]); |
1449 | 1449 | ||
1450 | dn_dev_devices_on(); | 1450 | dn_dev_devices_on(); |
1451 | 1451 | ||