[SK_BUFF]: Introduce ipv6_hdr(), remove skb->nh.ipv6h
[deliverable/linux.git] / drivers / s390 / net / qeth_eddp.c
index 7c735e1fe06377835f508d6abec84d9f7bf09d1d..90da58b4e532c78e944eb1116d981e37f0e590c2 100644 (file)
@@ -473,20 +473,24 @@ qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx,
        QETH_DBF_TEXT(trace, 5, "eddpficx");
        /* create our segmentation headers and copy original headers */
        if (skb->protocol == htons(ETH_P_IP))
-               eddp = qeth_eddp_create_eddp_data(qhdr, (u8 *)skb->nh.iph,
-                               skb->nh.iph->ihl*4,
-                               (u8 *)skb->h.th, skb->h.th->doff*4);
+               eddp = qeth_eddp_create_eddp_data(qhdr,
+                                                 skb_network_header(skb),
+                                                 ip_hdrlen(skb),
+                                                 skb->h.raw,
+                                                 skb->h.th->doff * 4);
        else
-               eddp = qeth_eddp_create_eddp_data(qhdr, (u8 *)skb->nh.ipv6h,
-                               sizeof(struct ipv6hdr),
-                               (u8 *)skb->h.th, skb->h.th->doff*4);
+               eddp = qeth_eddp_create_eddp_data(qhdr,
+                                                 skb_network_header(skb),
+                                                 sizeof(struct ipv6hdr),
+                                                 skb->h.raw,
+                                                 skb->h.th->doff * 4);
 
        if (eddp == NULL) {
                QETH_DBF_TEXT(trace, 2, "eddpfcnm");
                return -ENOMEM;
        }
        if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) {
-               skb->mac.raw = (skb->data) + sizeof(struct qeth_hdr);
+               skb_set_mac_header(skb, sizeof(struct qeth_hdr));
                memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN);
 #ifdef CONFIG_QETH_VLAN
                if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) {
@@ -590,8 +594,9 @@ qeth_eddp_create_context_tcp(struct qeth_card *card, struct sk_buff *skb,
        QETH_DBF_TEXT(trace, 5, "creddpct");
        if (skb->protocol == htons(ETH_P_IP))
                ctx = qeth_eddp_create_context_generic(card, skb,
-                       sizeof(struct qeth_hdr) + skb->nh.iph->ihl*4 +
-                       skb->h.th->doff*4);
+                                                      (sizeof(struct qeth_hdr) +
+                                                       ip_hdrlen(skb) +
+                                                       skb->h.th->doff * 4));
        else if (skb->protocol == htons(ETH_P_IPV6))
                ctx = qeth_eddp_create_context_generic(card, skb,
                        sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) +
This page took 0.045552 seconds and 5 git commands to generate.