summaryrefslogtreecommitdiffstats
path: root/net/sctp/output.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-07-18 23:07:09 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-18 23:07:09 -0700
commit336d3262df71fcd2661180bb35d5ea41b4cbca58 (patch)
tree54078334c9c3706a003d4b54a8e9e9b23aa01cef /net/sctp/output.c
parent4e54064e0a13b7a7d4a481123c1783f770538e30 (diff)
downloadlinux-336d3262df71fcd2661180bb35d5ea41b4cbca58.tar.bz2
sctp: remove unnecessary byteshifting, calculate directly in big-endian
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp/output.c')
-rw-r--r--net/sctp/output.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sctp/output.c b/net/sctp/output.c
index 9a63a3fb9011..45684646b1db 100644
--- a/net/sctp/output.c
+++ b/net/sctp/output.c
@@ -365,7 +365,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
struct sctp_transport *tp = packet->transport;
struct sctp_association *asoc = tp->asoc;
struct sctphdr *sh;
- __u32 crc32 = 0;
+ __be32 crc32 = __constant_cpu_to_be32(0);
struct sk_buff *nskb;
struct sctp_chunk *chunk, *tmp;
struct sock *sk;
@@ -538,7 +538,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)
/* 3) Put the resultant value into the checksum field in the
* common header, and leave the rest of the bits unchanged.
*/
- sh->checksum = htonl(crc32);
+ sh->checksum = crc32;
/* IP layer ECN support
* From RFC 2481