diff options
Diffstat (limited to 'drivers/s390/net/qeth_eddp.c')
-rw-r--r-- | drivers/s390/net/qeth_eddp.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index f94f1f25eec6..82cb4af2f0e7 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -1,6 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * | 2 | * linux/drivers/s390/net/qeth_eddp.c |
3 | * linux/drivers/s390/net/qeth_eddp.c ($Revision: 1.13 $) | ||
4 | * | 3 | * |
5 | * Enhanced Device Driver Packing (EDDP) support for the qeth driver. | 4 | * Enhanced Device Driver Packing (EDDP) support for the qeth driver. |
6 | * | 5 | * |
@@ -8,8 +7,6 @@ | |||
8 | * | 7 | * |
9 | * Author(s): Thomas Spatzier <tspat@de.ibm.com> | 8 | * Author(s): Thomas Spatzier <tspat@de.ibm.com> |
10 | * | 9 | * |
11 | * $Revision: 1.13 $ $Date: 2005/05/04 20:19:18 $ | ||
12 | * | ||
13 | */ | 10 | */ |
14 | #include <linux/config.h> | 11 | #include <linux/config.h> |
15 | #include <linux/errno.h> | 12 | #include <linux/errno.h> |
@@ -62,8 +59,7 @@ qeth_eddp_free_context(struct qeth_eddp_context *ctx) | |||
62 | for (i = 0; i < ctx->num_pages; ++i) | 59 | for (i = 0; i < ctx->num_pages; ++i) |
63 | free_page((unsigned long)ctx->pages[i]); | 60 | free_page((unsigned long)ctx->pages[i]); |
64 | kfree(ctx->pages); | 61 | kfree(ctx->pages); |
65 | if (ctx->elements != NULL) | 62 | kfree(ctx->elements); |
66 | kfree(ctx->elements); | ||
67 | kfree(ctx); | 63 | kfree(ctx); |
68 | } | 64 | } |
69 | 65 | ||
@@ -416,6 +412,13 @@ __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
416 | 412 | ||
417 | QETH_DBF_TEXT(trace, 5, "eddpftcp"); | 413 | QETH_DBF_TEXT(trace, 5, "eddpftcp"); |
418 | eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; | 414 | eddp->skb_offset = sizeof(struct qeth_hdr) + eddp->nhl + eddp->thl; |
415 | if (eddp->qh.hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { | ||
416 | eddp->skb_offset += sizeof(struct ethhdr); | ||
417 | #ifdef CONFIG_QETH_VLAN | ||
418 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) | ||
419 | eddp->skb_offset += VLAN_HLEN; | ||
420 | #endif /* CONFIG_QETH_VLAN */ | ||
421 | } | ||
419 | tcph = eddp->skb->h.th; | 422 | tcph = eddp->skb->h.th; |
420 | while (eddp->skb_offset < eddp->skb->len) { | 423 | while (eddp->skb_offset < eddp->skb->len) { |
421 | data_len = min((int)skb_shinfo(eddp->skb)->tso_size, | 424 | data_len = min((int)skb_shinfo(eddp->skb)->tso_size, |
@@ -486,6 +489,7 @@ qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
486 | return -ENOMEM; | 489 | return -ENOMEM; |
487 | } | 490 | } |
488 | if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { | 491 | if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { |
492 | skb->mac.raw = (skb->data) + sizeof(struct qeth_hdr); | ||
489 | memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN); | 493 | memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN); |
490 | #ifdef CONFIG_QETH_VLAN | 494 | #ifdef CONFIG_QETH_VLAN |
491 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) { | 495 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) { |