mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
4e54064e0a
commit
336d3262df
4 changed files with 20 additions and 15 deletions
|
@ -83,8 +83,8 @@ static inline int sctp_rcv_checksum(struct sk_buff *skb)
|
|||
{
|
||||
struct sk_buff *list = skb_shinfo(skb)->frag_list;
|
||||
struct sctphdr *sh = sctp_hdr(skb);
|
||||
__u32 cmp = ntohl(sh->checksum);
|
||||
__u32 val = sctp_start_cksum((__u8 *)sh, skb_headlen(skb));
|
||||
__be32 cmp = sh->checksum;
|
||||
__be32 val = sctp_start_cksum((__u8 *)sh, skb_headlen(skb));
|
||||
|
||||
for (; list; list = list->next)
|
||||
val = sctp_update_cksum((__u8 *)list->data, skb_headlen(list),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue