Loading drivers/net/gianfar.c +2 −2 Original line number Diff line number Diff line Loading @@ -944,9 +944,9 @@ static inline void gfar_tx_checksum(struct sk_buff *skb, struct txfcb *fcb) /* And provide the already calculated phcs */ if (ip_hdr(skb)->protocol == IPPROTO_UDP) { flags |= TXFCB_UDP; fcb->phcs = skb->h.uh->check; fcb->phcs = udp_hdr(skb)->check; } else fcb->phcs = skb->h.th->check; fcb->phcs = udp_hdr(skb)->check; /* l3os is the distance between the start of the * frame (skb->data) and the start of the IP hdr. Loading drivers/net/ioc3-eth.c +1 −1 Original line number Diff line number Diff line Loading @@ -1422,7 +1422,7 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) csoff = ETH_HLEN + (ih->ihl << 2); if (proto == IPPROTO_UDP) { csoff += offsetof(struct udphdr, check); skb->h.uh->check = csum; udp_hdr(skb)->check = csum; } if (proto == IPPROTO_TCP) { csoff += offsetof(struct tcphdr, check); Loading drivers/net/mv643xx_eth.c +1 −1 Original line number Diff line number Diff line Loading @@ -1166,7 +1166,7 @@ static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp, switch (ip_hdr(skb)->protocol) { case IPPROTO_UDP: cmd_sts |= ETH_UDP_FRAME; desc->l4i_chk = skb->h.uh->check; desc->l4i_chk = udp_hdr(skb)->check; break; case IPPROTO_TCP: desc->l4i_chk = skb->h.th->check; Loading include/linux/skbuff.h +0 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,6 @@ struct sk_buff { union { struct tcphdr *th; struct udphdr *uh; struct icmphdr *icmph; struct iphdr *ipiph; struct ipv6hdr *ipv6h; Loading include/linux/udp.h +9 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,15 @@ struct udphdr { __sum16 check; }; #ifdef __KERNEL__ #include <linux/skbuff.h> static inline struct udphdr *udp_hdr(const struct sk_buff *skb) { return (struct udphdr *)skb->h.raw; } #endif /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments */ #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */ Loading Loading
drivers/net/gianfar.c +2 −2 Original line number Diff line number Diff line Loading @@ -944,9 +944,9 @@ static inline void gfar_tx_checksum(struct sk_buff *skb, struct txfcb *fcb) /* And provide the already calculated phcs */ if (ip_hdr(skb)->protocol == IPPROTO_UDP) { flags |= TXFCB_UDP; fcb->phcs = skb->h.uh->check; fcb->phcs = udp_hdr(skb)->check; } else fcb->phcs = skb->h.th->check; fcb->phcs = udp_hdr(skb)->check; /* l3os is the distance between the start of the * frame (skb->data) and the start of the IP hdr. Loading
drivers/net/ioc3-eth.c +1 −1 Original line number Diff line number Diff line Loading @@ -1422,7 +1422,7 @@ static int ioc3_start_xmit(struct sk_buff *skb, struct net_device *dev) csoff = ETH_HLEN + (ih->ihl << 2); if (proto == IPPROTO_UDP) { csoff += offsetof(struct udphdr, check); skb->h.uh->check = csum; udp_hdr(skb)->check = csum; } if (proto == IPPROTO_TCP) { csoff += offsetof(struct tcphdr, check); Loading
drivers/net/mv643xx_eth.c +1 −1 Original line number Diff line number Diff line Loading @@ -1166,7 +1166,7 @@ static void eth_tx_submit_descs_for_skb(struct mv643xx_private *mp, switch (ip_hdr(skb)->protocol) { case IPPROTO_UDP: cmd_sts |= ETH_UDP_FRAME; desc->l4i_chk = skb->h.uh->check; desc->l4i_chk = udp_hdr(skb)->check; break; case IPPROTO_TCP: desc->l4i_chk = skb->h.th->check; Loading
include/linux/skbuff.h +0 −1 Original line number Diff line number Diff line Loading @@ -238,7 +238,6 @@ struct sk_buff { union { struct tcphdr *th; struct udphdr *uh; struct icmphdr *icmph; struct iphdr *ipiph; struct ipv6hdr *ipv6h; Loading
include/linux/udp.h +9 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,15 @@ struct udphdr { __sum16 check; }; #ifdef __KERNEL__ #include <linux/skbuff.h> static inline struct udphdr *udp_hdr(const struct sk_buff *skb) { return (struct udphdr *)skb->h.raw; } #endif /* UDP socket options */ #define UDP_CORK 1 /* Never send partially complete segments */ #define UDP_ENCAP 100 /* Set the socket to accept encapsulated packets */ Loading