aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_nsp_out.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet/dn_nsp_out.c')
-rw-r--r--net/decnet/dn_nsp_out.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index 1964faf203e4..2013c25b7f5a 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -230,7 +230,6 @@ static inline unsigned dn_nsp_clone_and_send(struct sk_buff *skb,
230/** 230/**
231 * dn_nsp_output - Try and send something from socket queues 231 * dn_nsp_output - Try and send something from socket queues
232 * @sk: The socket whose queues are to be investigated 232 * @sk: The socket whose queues are to be investigated
233 * @gfp: The memory allocation flags
234 * 233 *
235 * Try and send the packet on the end of the data and other data queues. 234 * Try and send the packet on the end of the data and other data queues.
236 * Other data gets priority over data, and if we retransmit a packet we 235 * Other data gets priority over data, and if we retransmit a packet we
@@ -326,8 +325,8 @@ static __le16 *dn_mk_ack_header(struct sock *sk, struct sk_buff *skb, unsigned c
326 325
327 ptr = (__le16 *)dn_mk_common_header(scp, skb, msgflag, hlen); 326 ptr = (__le16 *)dn_mk_common_header(scp, skb, msgflag, hlen);
328 327
329 *ptr++ = dn_htons(acknum); 328 *ptr++ = cpu_to_le16(acknum);
330 *ptr++ = dn_htons(ackcrs); 329 *ptr++ = cpu_to_le16(ackcrs);
331 330
332 return ptr; 331 return ptr;
333} 332}
@@ -345,7 +344,7 @@ static __le16 *dn_nsp_mk_data_header(struct sock *sk, struct sk_buff *skb, int o
345 cb->segnum = scp->numdat; 344 cb->segnum = scp->numdat;
346 seq_add(&scp->numdat, 1); 345 seq_add(&scp->numdat, 1);
347 } 346 }
348 *(ptr++) = dn_htons(cb->segnum); 347 *(ptr++) = cpu_to_le16(cb->segnum);
349 348
350 return ptr; 349 return ptr;
351} 350}
@@ -523,7 +522,7 @@ void dn_send_conn_conf(struct sock *sk, gfp_t gfp)
523 struct dn_scp *scp = DN_SK(sk); 522 struct dn_scp *scp = DN_SK(sk);
524 struct sk_buff *skb = NULL; 523 struct sk_buff *skb = NULL;
525 struct nsp_conn_init_msg *msg; 524 struct nsp_conn_init_msg *msg;
526 __u8 len = (__u8)dn_ntohs(scp->conndata_out.opt_optl); 525 __u8 len = (__u8)le16_to_cpu(scp->conndata_out.opt_optl);
527 526
528 if ((skb = dn_alloc_skb(sk, 50 + len, gfp)) == NULL) 527 if ((skb = dn_alloc_skb(sk, 50 + len, gfp)) == NULL)
529 return; 528 return;
@@ -534,7 +533,7 @@ void dn_send_conn_conf(struct sock *sk, gfp_t gfp)
534 msg->srcaddr = scp->addrloc; 533 msg->srcaddr = scp->addrloc;
535 msg->services = scp->services_loc; 534 msg->services = scp->services_loc;
536 msg->info = scp->info_loc; 535 msg->info = scp->info_loc;
537 msg->segsize = dn_htons(scp->segsize_loc); 536 msg->segsize = cpu_to_le16(scp->segsize_loc);
538 537
539 *skb_put(skb,1) = len; 538 *skb_put(skb,1) = len;
540 539
@@ -560,7 +559,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg,
560 559
561 if ((dst == NULL) || (rem == 0)) { 560 if ((dst == NULL) || (rem == 0)) {
562 if (net_ratelimit()) 561 if (net_ratelimit())
563 printk(KERN_DEBUG "DECnet: dn_nsp_do_disc: BUG! Please report this to SteveW@ACM.org rem=%u dst=%p\n", dn_ntohs(rem), dst); 562 printk(KERN_DEBUG "DECnet: dn_nsp_do_disc: BUG! Please report this to SteveW@ACM.org rem=%u dst=%p\n", le16_to_cpu(rem), dst);
564 return; 563 return;
565 } 564 }
566 565
@@ -573,7 +572,7 @@ static __inline__ void dn_nsp_do_disc(struct sock *sk, unsigned char msgflg,
573 msg += 2; 572 msg += 2;
574 *(__le16 *)msg = loc; 573 *(__le16 *)msg = loc;
575 msg += 2; 574 msg += 2;
576 *(__le16 *)msg = dn_htons(reason); 575 *(__le16 *)msg = cpu_to_le16(reason);
577 msg += 2; 576 msg += 2;
578 if (msgflg == NSP_DISCINIT) 577 if (msgflg == NSP_DISCINIT)
579 *msg++ = ddl; 578 *msg++ = ddl;
@@ -599,10 +598,10 @@ void dn_nsp_send_disc(struct sock *sk, unsigned char msgflg,
599 int ddl = 0; 598 int ddl = 0;
600 599
601 if (msgflg == NSP_DISCINIT) 600 if (msgflg == NSP_DISCINIT)
602 ddl = dn_ntohs(scp->discdata_out.opt_optl); 601 ddl = le16_to_cpu(scp->discdata_out.opt_optl);
603 602
604 if (reason == 0) 603 if (reason == 0)
605 reason = dn_ntohs(scp->discdata_out.opt_status); 604 reason = le16_to_cpu(scp->discdata_out.opt_status);
606 605
607 dn_nsp_do_disc(sk, msgflg, reason, gfp, sk->sk_dst_cache, ddl, 606 dn_nsp_do_disc(sk, msgflg, reason, gfp, sk->sk_dst_cache, ddl,
608 scp->discdata_out.opt_data, scp->addrrem, scp->addrloc); 607 scp->discdata_out.opt_data, scp->addrrem, scp->addrloc);
@@ -676,7 +675,7 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg)
676 msg->srcaddr = scp->addrloc; 675 msg->srcaddr = scp->addrloc;
677 msg->services = scp->services_loc; /* Requested flow control */ 676 msg->services = scp->services_loc; /* Requested flow control */
678 msg->info = scp->info_loc; /* Version Number */ 677 msg->info = scp->info_loc; /* Version Number */
679 msg->segsize = dn_htons(scp->segsize_loc); /* Max segment size */ 678 msg->segsize = cpu_to_le16(scp->segsize_loc); /* Max segment size */
680 679
681 if (scp->peer.sdn_objnum) 680 if (scp->peer.sdn_objnum)
682 type = 0; 681 type = 0;
@@ -709,7 +708,7 @@ void dn_nsp_send_conninit(struct sock *sk, unsigned char msgflg)
709 if (aux > 0) 708 if (aux > 0)
710 memcpy(skb_put(skb, aux), scp->accessdata.acc_acc, aux); 709 memcpy(skb_put(skb, aux), scp->accessdata.acc_acc, aux);
711 710
712 aux = (__u8)dn_ntohs(scp->conndata_out.opt_optl); 711 aux = (__u8)le16_to_cpu(scp->conndata_out.opt_optl);
713 *skb_put(skb, 1) = aux; 712 *skb_put(skb, 1) = aux;
714 if (aux > 0) 713 if (aux > 0)
715 memcpy(skb_put(skb,aux), scp->conndata_out.opt_data, aux); 714 memcpy(skb_put(skb,aux), scp->conndata_out.opt_data, aux);