diff options
Diffstat (limited to 'drivers/net/cassini.c')
-rw-r--r-- | drivers/net/cassini.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/cassini.c b/drivers/net/cassini.c index c8126484c2be..4aec747d9e43 100644 --- a/drivers/net/cassini.c +++ b/drivers/net/cassini.c | |||
@@ -1995,7 +1995,6 @@ static int cas_rx_process_pkt(struct cas *cp, struct cas_rx_comp *rxc, | |||
1995 | return -1; | 1995 | return -1; |
1996 | 1996 | ||
1997 | *skbref = skb; | 1997 | *skbref = skb; |
1998 | skb->dev = cp->dev; | ||
1999 | skb_reserve(skb, swivel); | 1998 | skb_reserve(skb, swivel); |
2000 | 1999 | ||
2001 | p = skb->data; | 2000 | p = skb->data; |
@@ -2822,10 +2821,8 @@ static inline int cas_xmit_tx_ringN(struct cas *cp, int ring, | |||
2822 | 2821 | ||
2823 | ctrl = 0; | 2822 | ctrl = 0; |
2824 | if (skb->ip_summed == CHECKSUM_PARTIAL) { | 2823 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
2825 | u64 csum_start_off, csum_stuff_off; | 2824 | const u64 csum_start_off = skb_transport_offset(skb); |
2826 | 2825 | const u64 csum_stuff_off = csum_start_off + skb->csum_offset; | |
2827 | csum_start_off = (u64) (skb->h.raw - skb->data); | ||
2828 | csum_stuff_off = csum_start_off + skb->csum_offset; | ||
2829 | 2826 | ||
2830 | ctrl = TX_DESC_CSUM_EN | | 2827 | ctrl = TX_DESC_CSUM_EN | |
2831 | CAS_BASE(TX_DESC_CSUM_START, csum_start_off) | | 2828 | CAS_BASE(TX_DESC_CSUM_START, csum_start_off) | |
@@ -2849,8 +2846,8 @@ static inline int cas_xmit_tx_ringN(struct cas *cp, int ring, | |||
2849 | ctrl | TX_DESC_SOF, 0); | 2846 | ctrl | TX_DESC_SOF, 0); |
2850 | entry = TX_DESC_NEXT(ring, entry); | 2847 | entry = TX_DESC_NEXT(ring, entry); |
2851 | 2848 | ||
2852 | memcpy(tx_tiny_buf(cp, ring, entry), skb->data + | 2849 | skb_copy_from_linear_data_offset(skb, len - tabort, |
2853 | len - tabort, tabort); | 2850 | tx_tiny_buf(cp, ring, entry), tabort); |
2854 | mapping = tx_tiny_map(cp, ring, entry, tentry); | 2851 | mapping = tx_tiny_map(cp, ring, entry, tentry); |
2855 | cas_write_txd(cp, ring, entry, mapping, tabort, ctrl, | 2852 | cas_write_txd(cp, ring, entry, mapping, tabort, ctrl, |
2856 | (nr_frags == 0)); | 2853 | (nr_frags == 0)); |