diff options
Diffstat (limited to 'drivers/net/myri10ge/myri10ge.c')
-rw-r--r-- | drivers/net/myri10ge/myri10ge.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index f8efe0e70a6b..16e3c4315e82 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -879,7 +879,7 @@ myri10ge_rx_skb_build(struct sk_buff *skb, u8 * va, | |||
879 | * skb_pull() (for ether_pad and eth_type_trans()) requires | 879 | * skb_pull() (for ether_pad and eth_type_trans()) requires |
880 | * the beginning of the packet in skb_headlen(), move it | 880 | * the beginning of the packet in skb_headlen(), move it |
881 | * manually */ | 881 | * manually */ |
882 | memcpy(skb->data, va, hlen); | 882 | skb_copy_to_linear_data(skb, va, hlen); |
883 | skb_shinfo(skb)->frags[0].page_offset += hlen; | 883 | skb_shinfo(skb)->frags[0].page_offset += hlen; |
884 | skb_shinfo(skb)->frags[0].size -= hlen; | 884 | skb_shinfo(skb)->frags[0].size -= hlen; |
885 | skb->data_len -= hlen; | 885 | skb->data_len -= hlen; |
@@ -1020,7 +1020,6 @@ myri10ge_rx_done(struct myri10ge_priv *mgp, struct myri10ge_rx_buf *rx, | |||
1020 | skb_shinfo(skb)->nr_frags = 0; | 1020 | skb_shinfo(skb)->nr_frags = 0; |
1021 | } | 1021 | } |
1022 | skb->protocol = eth_type_trans(skb, dev); | 1022 | skb->protocol = eth_type_trans(skb, dev); |
1023 | skb->dev = dev; | ||
1024 | 1023 | ||
1025 | if (mgp->csum_flag) { | 1024 | if (mgp->csum_flag) { |
1026 | if ((skb->protocol == htons(ETH_P_IP)) || | 1025 | if ((skb->protocol == htons(ETH_P_IP)) || |
@@ -2030,7 +2029,7 @@ again: | |||
2030 | odd_flag = 0; | 2029 | odd_flag = 0; |
2031 | flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST); | 2030 | flags = (MXGEFW_FLAGS_NO_TSO | MXGEFW_FLAGS_FIRST); |
2032 | if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { | 2031 | if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { |
2033 | cksum_offset = (skb->h.raw - skb->data); | 2032 | cksum_offset = skb_transport_offset(skb); |
2034 | pseudo_hdr_offset = cksum_offset + skb->csum_offset; | 2033 | pseudo_hdr_offset = cksum_offset + skb->csum_offset; |
2035 | /* If the headers are excessively large, then we must | 2034 | /* If the headers are excessively large, then we must |
2036 | * fall back to a software checksum */ | 2035 | * fall back to a software checksum */ |
@@ -2055,7 +2054,7 @@ again: | |||
2055 | * send loop that we are still in the | 2054 | * send loop that we are still in the |
2056 | * header portion of the TSO packet. | 2055 | * header portion of the TSO packet. |
2057 | * TSO header must be at most 134 bytes long */ | 2056 | * TSO header must be at most 134 bytes long */ |
2058 | cum_len = -((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); | 2057 | cum_len = -(skb_transport_offset(skb) + tcp_hdrlen(skb)); |
2059 | 2058 | ||
2060 | /* for TSO, pseudo_hdr_offset holds mss. | 2059 | /* for TSO, pseudo_hdr_offset holds mss. |
2061 | * The firmware figures out where to put | 2060 | * The firmware figures out where to put |