aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index fe60f0462c97..eafb6327d68f 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1280,12 +1280,17 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
1280 if (skb->nh.iph->protocol == IPPROTO_UDP) 1280 if (skb->nh.iph->protocol == IPPROTO_UDP)
1281 ctrl |= UDPTCP; 1281 ctrl |= UDPTCP;
1282 1282
1283 le = get_tx_le(sky2); 1283 if (hdr != sky2->tx_csum_start || offset != sky2->tx_csum_offset) {
1284 le->tx.csum.start = cpu_to_le16(hdr); 1284 sky2->tx_csum_start = hdr;
1285 le->tx.csum.offset = cpu_to_le16(offset); 1285 sky2->tx_csum_offset = offset;
1286 le->length = 0; /* initial checksum value */ 1286
1287 le->ctrl = 1; /* one packet */ 1287 le = get_tx_le(sky2);
1288 le->opcode = OP_TCPLISW | HW_OWNER; 1288 le->tx.csum.start = cpu_to_le16(hdr);
1289 le->tx.csum.offset = cpu_to_le16(offset);
1290 le->length = 0; /* initial checksum value */
1291 le->ctrl = 1; /* one packet */
1292 le->opcode = OP_TCPLISW | HW_OWNER;
1293 }
1289 } 1294 }
1290 1295
1291 le = get_tx_le(sky2); 1296 le = get_tx_le(sky2);