aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_neigh.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-11-27 03:12:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-27 03:12:47 -0500
commitc4106aa88a440430d387e022f2ad6dc1e0d52e98 (patch)
tree09064e6e767301ca28357ed5125e99123f5beaca /net/decnet/dn_neigh.c
parent5b9ab2ec04ec1e1e53939768805612ac191d7ba2 (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_neigh.c')
-rw-r--r--net/decnet/dn_neigh.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/decnet/dn_neigh.c b/net/decnet/dn_neigh.c
index 1ca13b17974d..05b5aa05e50e 100644
--- a/net/decnet/dn_neigh.c
+++ b/net/decnet/dn_neigh.c
@@ -250,7 +250,7 @@ static int dn_long_output(struct sk_buff *skb)
250 data = skb_push(skb, sizeof(struct dn_long_packet) + 3); 250 data = skb_push(skb, sizeof(struct dn_long_packet) + 3);
251 lp = (struct dn_long_packet *)(data+3); 251 lp = (struct dn_long_packet *)(data+3);
252 252
253 *((__le16 *)data) = dn_htons(skb->len - 2); 253 *((__le16 *)data) = cpu_to_le16(skb->len - 2);
254 *(data + 2) = 1 | DN_RT_F_PF; /* Padding */ 254 *(data + 2) = 1 | DN_RT_F_PF; /* Padding */
255 255
256 lp->msgflg = DN_RT_PKT_LONG|(cb->rt_flags&(DN_RT_F_IE|DN_RT_F_RQR|DN_RT_F_RTS)); 256 lp->msgflg = DN_RT_PKT_LONG|(cb->rt_flags&(DN_RT_F_IE|DN_RT_F_RQR|DN_RT_F_RTS));
@@ -294,7 +294,7 @@ static int dn_short_output(struct sk_buff *skb)
294 } 294 }
295 295
296 data = skb_push(skb, sizeof(struct dn_short_packet) + 2); 296 data = skb_push(skb, sizeof(struct dn_short_packet) + 2);
297 *((__le16 *)data) = dn_htons(skb->len - 2); 297 *((__le16 *)data) = cpu_to_le16(skb->len - 2);
298 sp = (struct dn_short_packet *)(data+2); 298 sp = (struct dn_short_packet *)(data+2);
299 299
300 sp->msgflg = DN_RT_PKT_SHORT|(cb->rt_flags&(DN_RT_F_RQR|DN_RT_F_RTS)); 300 sp->msgflg = DN_RT_PKT_SHORT|(cb->rt_flags&(DN_RT_F_RQR|DN_RT_F_RTS));
@@ -336,12 +336,12 @@ static int dn_phase3_output(struct sk_buff *skb)
336 } 336 }
337 337
338 data = skb_push(skb, sizeof(struct dn_short_packet) + 2); 338 data = skb_push(skb, sizeof(struct dn_short_packet) + 2);
339 *((__le16 *)data) = dn_htons(skb->len - 2); 339 *((__le16 *)data) = cpu_to_le16(skb->len - 2);
340 sp = (struct dn_short_packet *)(data + 2); 340 sp = (struct dn_short_packet *)(data + 2);
341 341
342 sp->msgflg = DN_RT_PKT_SHORT|(cb->rt_flags&(DN_RT_F_RQR|DN_RT_F_RTS)); 342 sp->msgflg = DN_RT_PKT_SHORT|(cb->rt_flags&(DN_RT_F_RQR|DN_RT_F_RTS));
343 sp->dstnode = cb->dst & dn_htons(0x03ff); 343 sp->dstnode = cb->dst & cpu_to_le16(0x03ff);
344 sp->srcnode = cb->src & dn_htons(0x03ff); 344 sp->srcnode = cb->src & cpu_to_le16(0x03ff);
345 sp->forward = cb->hops & 0x3f; 345 sp->forward = cb->hops & 0x3f;
346 346
347 skb_reset_network_header(skb); 347 skb_reset_network_header(skb);
@@ -394,7 +394,7 @@ int dn_neigh_router_hello(struct sk_buff *skb)
394 if (neigh->dev->type == ARPHRD_ETHER) 394 if (neigh->dev->type == ARPHRD_ETHER)
395 memcpy(neigh->ha, &eth_hdr(skb)->h_source, ETH_ALEN); 395 memcpy(neigh->ha, &eth_hdr(skb)->h_source, ETH_ALEN);
396 396
397 dn->blksize = dn_ntohs(msg->blksize); 397 dn->blksize = le16_to_cpu(msg->blksize);
398 dn->priority = msg->priority; 398 dn->priority = msg->priority;
399 399
400 dn->flags &= ~DN_NDFLAG_P3; 400 dn->flags &= ~DN_NDFLAG_P3;
@@ -410,7 +410,7 @@ int dn_neigh_router_hello(struct sk_buff *skb)
410 } 410 }
411 411
412 /* Only use routers in our area */ 412 /* Only use routers in our area */
413 if ((dn_ntohs(src)>>10) == (dn_ntohs((decnet_address))>>10)) { 413 if ((le16_to_cpu(src)>>10) == (le16_to_cpu((decnet_address))>>10)) {
414 if (!dn_db->router) { 414 if (!dn_db->router) {
415 dn_db->router = neigh_clone(neigh); 415 dn_db->router = neigh_clone(neigh);
416 } else { 416 } else {
@@ -453,7 +453,7 @@ int dn_neigh_endnode_hello(struct sk_buff *skb)
453 if (neigh->dev->type == ARPHRD_ETHER) 453 if (neigh->dev->type == ARPHRD_ETHER)
454 memcpy(neigh->ha, &eth_hdr(skb)->h_source, ETH_ALEN); 454 memcpy(neigh->ha, &eth_hdr(skb)->h_source, ETH_ALEN);
455 dn->flags &= ~(DN_NDFLAG_R1 | DN_NDFLAG_R2); 455 dn->flags &= ~(DN_NDFLAG_R1 | DN_NDFLAG_R2);
456 dn->blksize = dn_ntohs(msg->blksize); 456 dn->blksize = le16_to_cpu(msg->blksize);
457 dn->priority = 0; 457 dn->priority = 0;
458 } 458 }
459 459
@@ -543,7 +543,7 @@ static inline void dn_neigh_format_entry(struct seq_file *seq,
543 543
544 read_lock(&n->lock); 544 read_lock(&n->lock);
545 seq_printf(seq, "%-7s %s%s%s %02x %02d %07ld %-8s\n", 545 seq_printf(seq, "%-7s %s%s%s %02x %02d %07ld %-8s\n",
546 dn_addr2asc(dn_ntohs(dn->addr), buf), 546 dn_addr2asc(le16_to_cpu(dn->addr), buf),
547 (dn->flags&DN_NDFLAG_R1) ? "1" : "-", 547 (dn->flags&DN_NDFLAG_R1) ? "1" : "-",
548 (dn->flags&DN_NDFLAG_R2) ? "2" : "-", 548 (dn->flags&DN_NDFLAG_R2) ? "2" : "-",
549 (dn->flags&DN_NDFLAG_P3) ? "3" : "-", 549 (dn->flags&DN_NDFLAG_P3) ? "3" : "-",