diff options
Diffstat (limited to 'drivers/net/pasemi_mac.c')
-rw-r--r-- | drivers/net/pasemi_mac.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c index 3f4213f3d5de..82218720bc3e 100644 --- a/drivers/net/pasemi_mac.c +++ b/drivers/net/pasemi_mac.c | |||
@@ -729,16 +729,18 @@ static int pasemi_mac_start_tx(struct sk_buff *skb, struct net_device *dev) | |||
729 | dflags = XCT_MACTX_O | XCT_MACTX_ST | XCT_MACTX_SS | XCT_MACTX_CRC_PAD; | 729 | dflags = XCT_MACTX_O | XCT_MACTX_ST | XCT_MACTX_SS | XCT_MACTX_CRC_PAD; |
730 | 730 | ||
731 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 731 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
732 | const unsigned char *nh = skb_network_header(skb); | ||
733 | |||
732 | switch (skb->nh.iph->protocol) { | 734 | switch (skb->nh.iph->protocol) { |
733 | case IPPROTO_TCP: | 735 | case IPPROTO_TCP: |
734 | dflags |= XCT_MACTX_CSUM_TCP; | 736 | dflags |= XCT_MACTX_CSUM_TCP; |
735 | dflags |= XCT_MACTX_IPH((skb->h.raw - skb->nh.raw) >> 2); | 737 | dflags |= XCT_MACTX_IPH((skb->h.raw - skb->nh.raw) >> 2); |
736 | dflags |= XCT_MACTX_IPO(skb->nh.raw - skb->data); | 738 | dflags |= XCT_MACTX_IPO(nh - skb->data); |
737 | break; | 739 | break; |
738 | case IPPROTO_UDP: | 740 | case IPPROTO_UDP: |
739 | dflags |= XCT_MACTX_CSUM_UDP; | 741 | dflags |= XCT_MACTX_CSUM_UDP; |
740 | dflags |= XCT_MACTX_IPH((skb->h.raw - skb->nh.raw) >> 2); | 742 | dflags |= XCT_MACTX_IPH((skb->h.raw - skb->nh.raw) >> 2); |
741 | dflags |= XCT_MACTX_IPO(skb->nh.raw - skb->data); | 743 | dflags |= XCT_MACTX_IPO(nh - skb->data); |
742 | break; | 744 | break; |
743 | } | 745 | } |
744 | } | 746 | } |