diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:26:46 -0400 |
commit | 15c54033964a943de7b0763efd3bd0ede7326395 (patch) | |
tree | 840b292612d1b5396d5bab5bde537a9013db3ceb /drivers/s390 | |
parent | ad5da3cf39a5b11a198929be1f2644e17ecd767e (diff) | |
parent | 912a41a4ab935ce8c4308428ec13fc7f8b1f18f4 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (448 commits)
[IPV4] nl_fib_lookup: Initialise res.r before fib_res_put(&res)
[IPV6]: Fix thinko in ipv6_rthdr_rcv() changes.
[IPV4]: Add multipath cached to feature-removal-schedule.txt
[WIRELESS] cfg80211: Clarify locking comment.
[WIRELESS] cfg80211: Fix locking in wiphy_new.
[WEXT] net_device: Don't include wext bits if not required.
[WEXT]: Misc code cleanups.
[WEXT]: Reduce inline abuse.
[WEXT]: Move EXPORT_SYMBOL statements where they belong.
[WEXT]: Cleanup early ioctl call path.
[WEXT]: Remove options.
[WEXT]: Remove dead debug code.
[WEXT]: Clean up how wext is called.
[WEXT]: Move to net/wireless
[AFS]: Eliminate cmpxchg() usage in vlocation code.
[RXRPC]: Fix pointers passed to bitops.
[RXRPC]: Remove bogus atomic_* overrides.
[AFS]: Fix u64 printing in debug logging.
[AFS]: Add "directory write" support.
[AFS]: Implement the CB.InitCallBackState3 operation.
...
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/claw.c | 2 | ||||
-rw-r--r-- | drivers/s390/net/ctcmain.c | 28 | ||||
-rw-r--r-- | drivers/s390/net/lcs.c | 3 | ||||
-rw-r--r-- | drivers/s390/net/netiucv.c | 21 | ||||
-rw-r--r-- | drivers/s390/net/qeth_eddp.c | 30 | ||||
-rw-r--r-- | drivers/s390/net/qeth_main.c | 45 | ||||
-rw-r--r-- | drivers/s390/net/qeth_tso.h | 14 |
7 files changed, 81 insertions, 62 deletions
diff --git a/drivers/s390/net/claw.c b/drivers/s390/net/claw.c index 7809a79feec7..6dd64d0c8d45 100644 --- a/drivers/s390/net/claw.c +++ b/drivers/s390/net/claw.c | |||
@@ -3525,8 +3525,8 @@ unpack_next: | |||
3525 | memcpy(skb_put(skb,len_of_data), | 3525 | memcpy(skb_put(skb,len_of_data), |
3526 | privptr->p_mtc_envelope, | 3526 | privptr->p_mtc_envelope, |
3527 | len_of_data); | 3527 | len_of_data); |
3528 | skb->mac.raw=skb->data; | ||
3529 | skb->dev=dev; | 3528 | skb->dev=dev; |
3529 | skb_reset_mac_header(skb); | ||
3530 | skb->protocol=htons(ETH_P_IP); | 3530 | skb->protocol=htons(ETH_P_IP); |
3531 | skb->ip_summed=CHECKSUM_UNNECESSARY; | 3531 | skb->ip_summed=CHECKSUM_UNNECESSARY; |
3532 | privptr->stats.rx_packets++; | 3532 | privptr->stats.rx_packets++; |
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 570a960bfb5b..b20fd0681733 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -455,7 +455,7 @@ ctc_unpack_skb(struct channel *ch, struct sk_buff *pskb) | |||
455 | return; | 455 | return; |
456 | } | 456 | } |
457 | skb_put(pskb, header->length); | 457 | skb_put(pskb, header->length); |
458 | pskb->mac.raw = pskb->data; | 458 | skb_reset_mac_header(pskb); |
459 | len -= header->length; | 459 | len -= header->length; |
460 | skb = dev_alloc_skb(pskb->len); | 460 | skb = dev_alloc_skb(pskb->len); |
461 | if (!skb) { | 461 | if (!skb) { |
@@ -472,8 +472,9 @@ ctc_unpack_skb(struct channel *ch, struct sk_buff *pskb) | |||
472 | privptr->stats.rx_dropped++; | 472 | privptr->stats.rx_dropped++; |
473 | return; | 473 | return; |
474 | } | 474 | } |
475 | memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); | 475 | skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len), |
476 | skb->mac.raw = skb->data; | 476 | pskb->len); |
477 | skb_reset_mac_header(skb); | ||
477 | skb->dev = pskb->dev; | 478 | skb->dev = pskb->dev; |
478 | skb->protocol = pskb->protocol; | 479 | skb->protocol = pskb->protocol; |
479 | pskb->ip_summed = CHECKSUM_UNNECESSARY; | 480 | pskb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -706,7 +707,8 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg) | |||
706 | spin_unlock(&ch->collect_lock); | 707 | spin_unlock(&ch->collect_lock); |
707 | return; | 708 | return; |
708 | } | 709 | } |
709 | ch->trans_skb->tail = ch->trans_skb->data = ch->trans_skb_data; | 710 | ch->trans_skb->data = ch->trans_skb_data; |
711 | skb_reset_tail_pointer(ch->trans_skb); | ||
710 | ch->trans_skb->len = 0; | 712 | ch->trans_skb->len = 0; |
711 | if (ch->prof.maxmulti < (ch->collect_len + 2)) | 713 | if (ch->prof.maxmulti < (ch->collect_len + 2)) |
712 | ch->prof.maxmulti = ch->collect_len + 2; | 714 | ch->prof.maxmulti = ch->collect_len + 2; |
@@ -715,8 +717,9 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg) | |||
715 | *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2; | 717 | *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2; |
716 | i = 0; | 718 | i = 0; |
717 | while ((skb = skb_dequeue(&ch->collect_queue))) { | 719 | while ((skb = skb_dequeue(&ch->collect_queue))) { |
718 | memcpy(skb_put(ch->trans_skb, skb->len), skb->data, | 720 | skb_copy_from_linear_data(skb, skb_put(ch->trans_skb, |
719 | skb->len); | 721 | skb->len), |
722 | skb->len); | ||
720 | privptr->stats.tx_packets++; | 723 | privptr->stats.tx_packets++; |
721 | privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH; | 724 | privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH; |
722 | atomic_dec(&skb->users); | 725 | atomic_dec(&skb->users); |
@@ -831,7 +834,8 @@ ch_action_rx(fsm_instance * fi, int event, void *arg) | |||
831 | ctc_unpack_skb(ch, skb); | 834 | ctc_unpack_skb(ch, skb); |
832 | } | 835 | } |
833 | again: | 836 | again: |
834 | skb->data = skb->tail = ch->trans_skb_data; | 837 | skb->data = ch->trans_skb_data; |
838 | skb_reset_tail_pointer(skb); | ||
835 | skb->len = 0; | 839 | skb->len = 0; |
836 | if (ctc_checkalloc_buffer(ch, 1)) | 840 | if (ctc_checkalloc_buffer(ch, 1)) |
837 | return; | 841 | return; |
@@ -2223,7 +2227,8 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2223 | * IDAL support in CTC is broken, so we have to | 2227 | * IDAL support in CTC is broken, so we have to |
2224 | * care about skb's above 2G ourselves. | 2228 | * care about skb's above 2G ourselves. |
2225 | */ | 2229 | */ |
2226 | hi = ((unsigned long) skb->tail + LL_HEADER_LENGTH) >> 31; | 2230 | hi = ((unsigned long)skb_tail_pointer(skb) + |
2231 | LL_HEADER_LENGTH) >> 31; | ||
2227 | if (hi) { | 2232 | if (hi) { |
2228 | nskb = alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); | 2233 | nskb = alloc_skb(skb->len, GFP_ATOMIC | GFP_DMA); |
2229 | if (!nskb) { | 2234 | if (!nskb) { |
@@ -2259,11 +2264,12 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2259 | return -EBUSY; | 2264 | return -EBUSY; |
2260 | } | 2265 | } |
2261 | 2266 | ||
2262 | ch->trans_skb->tail = ch->trans_skb->data; | 2267 | skb_reset_tail_pointer(ch->trans_skb); |
2263 | ch->trans_skb->len = 0; | 2268 | ch->trans_skb->len = 0; |
2264 | ch->ccw[1].count = skb->len; | 2269 | ch->ccw[1].count = skb->len; |
2265 | memcpy(skb_put(ch->trans_skb, skb->len), skb->data, | 2270 | skb_copy_from_linear_data(skb, skb_put(ch->trans_skb, |
2266 | skb->len); | 2271 | skb->len), |
2272 | skb->len); | ||
2267 | atomic_dec(&skb->users); | 2273 | atomic_dec(&skb->users); |
2268 | dev_kfree_skb_irq(skb); | 2274 | dev_kfree_skb_irq(skb); |
2269 | ccw_idx = 0; | 2275 | ccw_idx = 0; |
diff --git a/drivers/s390/net/lcs.c b/drivers/s390/net/lcs.c index ecca1046714e..08a994fdd1a4 100644 --- a/drivers/s390/net/lcs.c +++ b/drivers/s390/net/lcs.c | |||
@@ -1576,7 +1576,7 @@ __lcs_start_xmit(struct lcs_card *card, struct sk_buff *skb, | |||
1576 | header->offset = card->tx_buffer->count; | 1576 | header->offset = card->tx_buffer->count; |
1577 | header->type = card->lan_type; | 1577 | header->type = card->lan_type; |
1578 | header->slot = card->portno; | 1578 | header->slot = card->portno; |
1579 | memcpy(header + 1, skb->data, skb->len); | 1579 | skb_copy_from_linear_data(skb, header + 1, skb->len); |
1580 | spin_unlock(&card->lock); | 1580 | spin_unlock(&card->lock); |
1581 | card->stats.tx_bytes += skb->len; | 1581 | card->stats.tx_bytes += skb->len; |
1582 | card->stats.tx_packets++; | 1582 | card->stats.tx_packets++; |
@@ -1784,7 +1784,6 @@ lcs_get_skb(struct lcs_card *card, char *skb_data, unsigned int skb_len) | |||
1784 | card->stats.rx_dropped++; | 1784 | card->stats.rx_dropped++; |
1785 | return; | 1785 | return; |
1786 | } | 1786 | } |
1787 | skb->dev = card->dev; | ||
1788 | memcpy(skb_put(skb, skb_len), skb_data, skb_len); | 1787 | memcpy(skb_put(skb, skb_len), skb_data, skb_len); |
1789 | skb->protocol = card->lan_type_trans(skb, card->dev); | 1788 | skb->protocol = card->lan_type_trans(skb, card->dev); |
1790 | card->stats.rx_bytes += skb_len; | 1789 | card->stats.rx_bytes += skb_len; |
diff --git a/drivers/s390/net/netiucv.c b/drivers/s390/net/netiucv.c index 594320ca1b7c..e10e85e85c84 100644 --- a/drivers/s390/net/netiucv.c +++ b/drivers/s390/net/netiucv.c | |||
@@ -635,7 +635,7 @@ static void netiucv_unpack_skb(struct iucv_connection *conn, | |||
635 | return; | 635 | return; |
636 | } | 636 | } |
637 | skb_put(pskb, header->next); | 637 | skb_put(pskb, header->next); |
638 | pskb->mac.raw = pskb->data; | 638 | skb_reset_mac_header(pskb); |
639 | skb = dev_alloc_skb(pskb->len); | 639 | skb = dev_alloc_skb(pskb->len); |
640 | if (!skb) { | 640 | if (!skb) { |
641 | PRINT_WARN("%s Out of memory in netiucv_unpack_skb\n", | 641 | PRINT_WARN("%s Out of memory in netiucv_unpack_skb\n", |
@@ -645,8 +645,9 @@ static void netiucv_unpack_skb(struct iucv_connection *conn, | |||
645 | privptr->stats.rx_dropped++; | 645 | privptr->stats.rx_dropped++; |
646 | return; | 646 | return; |
647 | } | 647 | } |
648 | memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); | 648 | skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len), |
649 | skb->mac.raw = skb->data; | 649 | pskb->len); |
650 | skb_reset_mac_header(skb); | ||
650 | skb->dev = pskb->dev; | 651 | skb->dev = pskb->dev; |
651 | skb->protocol = pskb->protocol; | 652 | skb->protocol = pskb->protocol; |
652 | pskb->ip_summed = CHECKSUM_UNNECESSARY; | 653 | pskb->ip_summed = CHECKSUM_UNNECESSARY; |
@@ -689,7 +690,8 @@ static void conn_action_rx(fsm_instance *fi, int event, void *arg) | |||
689 | msg->length, conn->max_buffsize); | 690 | msg->length, conn->max_buffsize); |
690 | return; | 691 | return; |
691 | } | 692 | } |
692 | conn->rx_buff->data = conn->rx_buff->tail = conn->rx_buff->head; | 693 | conn->rx_buff->data = conn->rx_buff->head; |
694 | skb_reset_tail_pointer(conn->rx_buff); | ||
693 | conn->rx_buff->len = 0; | 695 | conn->rx_buff->len = 0; |
694 | rc = iucv_message_receive(conn->path, msg, 0, conn->rx_buff->data, | 696 | rc = iucv_message_receive(conn->path, msg, 0, conn->rx_buff->data, |
695 | msg->length, NULL); | 697 | msg->length, NULL); |
@@ -735,14 +737,17 @@ static void conn_action_txdone(fsm_instance *fi, int event, void *arg) | |||
735 | } | 737 | } |
736 | } | 738 | } |
737 | } | 739 | } |
738 | conn->tx_buff->data = conn->tx_buff->tail = conn->tx_buff->head; | 740 | conn->tx_buff->data = conn->tx_buff->head; |
741 | skb_reset_tail_pointer(conn->tx_buff); | ||
739 | conn->tx_buff->len = 0; | 742 | conn->tx_buff->len = 0; |
740 | spin_lock_irqsave(&conn->collect_lock, saveflags); | 743 | spin_lock_irqsave(&conn->collect_lock, saveflags); |
741 | while ((skb = skb_dequeue(&conn->collect_queue))) { | 744 | while ((skb = skb_dequeue(&conn->collect_queue))) { |
742 | header.next = conn->tx_buff->len + skb->len + NETIUCV_HDRLEN; | 745 | header.next = conn->tx_buff->len + skb->len + NETIUCV_HDRLEN; |
743 | memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, | 746 | memcpy(skb_put(conn->tx_buff, NETIUCV_HDRLEN), &header, |
744 | NETIUCV_HDRLEN); | 747 | NETIUCV_HDRLEN); |
745 | memcpy(skb_put(conn->tx_buff, skb->len), skb->data, skb->len); | 748 | skb_copy_from_linear_data(skb, |
749 | skb_put(conn->tx_buff, skb->len), | ||
750 | skb->len); | ||
746 | txbytes += skb->len; | 751 | txbytes += skb->len; |
747 | txpackets++; | 752 | txpackets++; |
748 | stat_maxcq++; | 753 | stat_maxcq++; |
@@ -1164,8 +1169,8 @@ static int netiucv_transmit_skb(struct iucv_connection *conn, | |||
1164 | * Copy the skb to a new allocated skb in lowmem only if the | 1169 | * Copy the skb to a new allocated skb in lowmem only if the |
1165 | * data is located above 2G in memory or tailroom is < 2. | 1170 | * data is located above 2G in memory or tailroom is < 2. |
1166 | */ | 1171 | */ |
1167 | unsigned long hi = | 1172 | unsigned long hi = ((unsigned long)(skb_tail_pointer(skb) + |
1168 | ((unsigned long)(skb->tail + NETIUCV_HDRLEN)) >> 31; | 1173 | NETIUCV_HDRLEN)) >> 31; |
1169 | int copied = 0; | 1174 | int copied = 0; |
1170 | if (hi || (skb_tailroom(skb) < 2)) { | 1175 | if (hi || (skb_tailroom(skb) < 2)) { |
1171 | nskb = alloc_skb(skb->len + NETIUCV_HDRLEN + | 1176 | nskb = alloc_skb(skb->len + NETIUCV_HDRLEN + |
diff --git a/drivers/s390/net/qeth_eddp.c b/drivers/s390/net/qeth_eddp.c index 7c735e1fe063..dd7034fbfff8 100644 --- a/drivers/s390/net/qeth_eddp.c +++ b/drivers/s390/net/qeth_eddp.c | |||
@@ -267,7 +267,8 @@ qeth_eddp_copy_data_tcp(char *dst, struct qeth_eddp_data *eddp, int len, | |||
267 | 267 | ||
268 | QETH_DBF_TEXT(trace, 5, "eddpcdtc"); | 268 | QETH_DBF_TEXT(trace, 5, "eddpcdtc"); |
269 | if (skb_shinfo(eddp->skb)->nr_frags == 0) { | 269 | if (skb_shinfo(eddp->skb)->nr_frags == 0) { |
270 | memcpy(dst, eddp->skb->data + eddp->skb_offset, len); | 270 | skb_copy_from_linear_data_offset(eddp->skb, eddp->skb_offset, |
271 | dst, len); | ||
271 | *hcsum = csum_partial(eddp->skb->data + eddp->skb_offset, len, | 272 | *hcsum = csum_partial(eddp->skb->data + eddp->skb_offset, len, |
272 | *hcsum); | 273 | *hcsum); |
273 | eddp->skb_offset += len; | 274 | eddp->skb_offset += len; |
@@ -416,7 +417,7 @@ __qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
416 | eddp->skb_offset += VLAN_HLEN; | 417 | eddp->skb_offset += VLAN_HLEN; |
417 | #endif /* CONFIG_QETH_VLAN */ | 418 | #endif /* CONFIG_QETH_VLAN */ |
418 | } | 419 | } |
419 | tcph = eddp->skb->h.th; | 420 | tcph = tcp_hdr(eddp->skb); |
420 | while (eddp->skb_offset < eddp->skb->len) { | 421 | while (eddp->skb_offset < eddp->skb->len) { |
421 | data_len = min((int)skb_shinfo(eddp->skb)->gso_size, | 422 | data_len = min((int)skb_shinfo(eddp->skb)->gso_size, |
422 | (int)(eddp->skb->len - eddp->skb_offset)); | 423 | (int)(eddp->skb->len - eddp->skb_offset)); |
@@ -473,20 +474,24 @@ qeth_eddp_fill_context_tcp(struct qeth_eddp_context *ctx, | |||
473 | QETH_DBF_TEXT(trace, 5, "eddpficx"); | 474 | QETH_DBF_TEXT(trace, 5, "eddpficx"); |
474 | /* create our segmentation headers and copy original headers */ | 475 | /* create our segmentation headers and copy original headers */ |
475 | if (skb->protocol == htons(ETH_P_IP)) | 476 | if (skb->protocol == htons(ETH_P_IP)) |
476 | eddp = qeth_eddp_create_eddp_data(qhdr, (u8 *)skb->nh.iph, | 477 | eddp = qeth_eddp_create_eddp_data(qhdr, |
477 | skb->nh.iph->ihl*4, | 478 | skb_network_header(skb), |
478 | (u8 *)skb->h.th, skb->h.th->doff*4); | 479 | ip_hdrlen(skb), |
480 | skb_transport_header(skb), | ||
481 | tcp_hdrlen(skb)); | ||
479 | else | 482 | else |
480 | eddp = qeth_eddp_create_eddp_data(qhdr, (u8 *)skb->nh.ipv6h, | 483 | eddp = qeth_eddp_create_eddp_data(qhdr, |
481 | sizeof(struct ipv6hdr), | 484 | skb_network_header(skb), |
482 | (u8 *)skb->h.th, skb->h.th->doff*4); | 485 | sizeof(struct ipv6hdr), |
486 | skb_transport_header(skb), | ||
487 | tcp_hdrlen(skb)); | ||
483 | 488 | ||
484 | if (eddp == NULL) { | 489 | if (eddp == NULL) { |
485 | QETH_DBF_TEXT(trace, 2, "eddpfcnm"); | 490 | QETH_DBF_TEXT(trace, 2, "eddpfcnm"); |
486 | return -ENOMEM; | 491 | return -ENOMEM; |
487 | } | 492 | } |
488 | if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { | 493 | if (qhdr->hdr.l2.id == QETH_HEADER_TYPE_LAYER2) { |
489 | skb->mac.raw = (skb->data) + sizeof(struct qeth_hdr); | 494 | skb_set_mac_header(skb, sizeof(struct qeth_hdr)); |
490 | memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN); | 495 | memcpy(&eddp->mac, eth_hdr(skb), ETH_HLEN); |
491 | #ifdef CONFIG_QETH_VLAN | 496 | #ifdef CONFIG_QETH_VLAN |
492 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) { | 497 | if (eddp->mac.h_proto == __constant_htons(ETH_P_8021Q)) { |
@@ -590,12 +595,13 @@ qeth_eddp_create_context_tcp(struct qeth_card *card, struct sk_buff *skb, | |||
590 | QETH_DBF_TEXT(trace, 5, "creddpct"); | 595 | QETH_DBF_TEXT(trace, 5, "creddpct"); |
591 | if (skb->protocol == htons(ETH_P_IP)) | 596 | if (skb->protocol == htons(ETH_P_IP)) |
592 | ctx = qeth_eddp_create_context_generic(card, skb, | 597 | ctx = qeth_eddp_create_context_generic(card, skb, |
593 | sizeof(struct qeth_hdr) + skb->nh.iph->ihl*4 + | 598 | (sizeof(struct qeth_hdr) + |
594 | skb->h.th->doff*4); | 599 | ip_hdrlen(skb) + |
600 | tcp_hdrlen(skb))); | ||
595 | else if (skb->protocol == htons(ETH_P_IPV6)) | 601 | else if (skb->protocol == htons(ETH_P_IPV6)) |
596 | ctx = qeth_eddp_create_context_generic(card, skb, | 602 | ctx = qeth_eddp_create_context_generic(card, skb, |
597 | sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) + | 603 | sizeof(struct qeth_hdr) + sizeof(struct ipv6hdr) + |
598 | skb->h.th->doff*4); | 604 | tcp_hdrlen(skb)); |
599 | else | 605 | else |
600 | QETH_DBF_TEXT(trace, 2, "cetcpinv"); | 606 | QETH_DBF_TEXT(trace, 2, "cetcpinv"); |
601 | 607 | ||
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index d8a86f5af379..ad7792dc1a04 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -2278,7 +2278,7 @@ qeth_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
2278 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR)) | 2278 | (card->info.link_type == QETH_LINK_TYPE_LANE_TR)) |
2279 | return tr_type_trans(skb,dev); | 2279 | return tr_type_trans(skb,dev); |
2280 | #endif /* CONFIG_TR */ | 2280 | #endif /* CONFIG_TR */ |
2281 | skb->mac.raw = skb->data; | 2281 | skb_reset_mac_header(skb); |
2282 | skb_pull(skb, ETH_HLEN ); | 2282 | skb_pull(skb, ETH_HLEN ); |
2283 | eth = eth_hdr(skb); | 2283 | eth = eth_hdr(skb); |
2284 | 2284 | ||
@@ -2306,9 +2306,9 @@ qeth_rebuild_skb_fake_ll_tr(struct qeth_card *card, struct sk_buff *skb, | |||
2306 | struct iphdr *ip_hdr; | 2306 | struct iphdr *ip_hdr; |
2307 | 2307 | ||
2308 | QETH_DBF_TEXT(trace,5,"skbfktr"); | 2308 | QETH_DBF_TEXT(trace,5,"skbfktr"); |
2309 | skb->mac.raw = skb->data - QETH_FAKE_LL_LEN_TR; | 2309 | skb_set_mac_header(skb, -QETH_FAKE_LL_LEN_TR); |
2310 | /* this is a fake ethernet header */ | 2310 | /* this is a fake ethernet header */ |
2311 | fake_hdr = (struct trh_hdr *) skb->mac.raw; | 2311 | fake_hdr = tr_hdr(skb); |
2312 | 2312 | ||
2313 | /* the destination MAC address */ | 2313 | /* the destination MAC address */ |
2314 | switch (skb->pkt_type){ | 2314 | switch (skb->pkt_type){ |
@@ -2359,9 +2359,9 @@ qeth_rebuild_skb_fake_ll_eth(struct qeth_card *card, struct sk_buff *skb, | |||
2359 | struct iphdr *ip_hdr; | 2359 | struct iphdr *ip_hdr; |
2360 | 2360 | ||
2361 | QETH_DBF_TEXT(trace,5,"skbfketh"); | 2361 | QETH_DBF_TEXT(trace,5,"skbfketh"); |
2362 | skb->mac.raw = skb->data - QETH_FAKE_LL_LEN_ETH; | 2362 | skb_set_mac_header(skb, -QETH_FAKE_LL_LEN_ETH); |
2363 | /* this is a fake ethernet header */ | 2363 | /* this is a fake ethernet header */ |
2364 | fake_hdr = (struct ethhdr *) skb->mac.raw; | 2364 | fake_hdr = eth_hdr(skb); |
2365 | 2365 | ||
2366 | /* the destination MAC address */ | 2366 | /* the destination MAC address */ |
2367 | switch (skb->pkt_type){ | 2367 | switch (skb->pkt_type){ |
@@ -2461,7 +2461,7 @@ qeth_rebuild_skb(struct qeth_card *card, struct sk_buff *skb, | |||
2461 | if (card->options.fake_ll) | 2461 | if (card->options.fake_ll) |
2462 | qeth_rebuild_skb_fake_ll(card, skb, hdr); | 2462 | qeth_rebuild_skb_fake_ll(card, skb, hdr); |
2463 | else | 2463 | else |
2464 | skb->mac.raw = skb->data; | 2464 | skb_reset_mac_header(skb); |
2465 | skb->ip_summed = card->options.checksum_type; | 2465 | skb->ip_summed = card->options.checksum_type; |
2466 | if (card->options.checksum_type == HW_CHECKSUMMING){ | 2466 | if (card->options.checksum_type == HW_CHECKSUMMING){ |
2467 | if ( (hdr->hdr.l3.ext_flags & | 2467 | if ( (hdr->hdr.l3.ext_flags & |
@@ -2501,7 +2501,8 @@ qeth_process_inbound_buffer(struct qeth_card *card, | |||
2501 | vlan_tag = qeth_rebuild_skb(card, skb, hdr); | 2501 | vlan_tag = qeth_rebuild_skb(card, skb, hdr); |
2502 | else { /*in case of OSN*/ | 2502 | else { /*in case of OSN*/ |
2503 | skb_push(skb, sizeof(struct qeth_hdr)); | 2503 | skb_push(skb, sizeof(struct qeth_hdr)); |
2504 | memcpy(skb->data, hdr, sizeof(struct qeth_hdr)); | 2504 | skb_copy_to_linear_data(skb, hdr, |
2505 | sizeof(struct qeth_hdr)); | ||
2505 | } | 2506 | } |
2506 | /* is device UP ? */ | 2507 | /* is device UP ? */ |
2507 | if (!(card->dev->flags & IFF_UP)){ | 2508 | if (!(card->dev->flags & IFF_UP)){ |
@@ -3778,9 +3779,11 @@ qeth_get_cast_type(struct qeth_card *card, struct sk_buff *skb) | |||
3778 | } | 3779 | } |
3779 | /* try something else */ | 3780 | /* try something else */ |
3780 | if (skb->protocol == ETH_P_IPV6) | 3781 | if (skb->protocol == ETH_P_IPV6) |
3781 | return (skb->nh.raw[24] == 0xff) ? RTN_MULTICAST : 0; | 3782 | return (skb_network_header(skb)[24] == 0xff) ? |
3783 | RTN_MULTICAST : 0; | ||
3782 | else if (skb->protocol == ETH_P_IP) | 3784 | else if (skb->protocol == ETH_P_IP) |
3783 | return ((skb->nh.raw[16] & 0xf0) == 0xe0) ? RTN_MULTICAST : 0; | 3785 | return ((skb_network_header(skb)[16] & 0xf0) == 0xe0) ? |
3786 | RTN_MULTICAST : 0; | ||
3784 | /* ... */ | 3787 | /* ... */ |
3785 | if (!memcmp(skb->data, skb->dev->broadcast, 6)) | 3788 | if (!memcmp(skb->data, skb->dev->broadcast, 6)) |
3786 | return RTN_BROADCAST; | 3789 | return RTN_BROADCAST; |
@@ -3818,18 +3821,20 @@ qeth_get_priority_queue(struct qeth_card *card, struct sk_buff *skb, | |||
3818 | return card->info.is_multicast_different & | 3821 | return card->info.is_multicast_different & |
3819 | (card->qdio.no_out_queues - 1); | 3822 | (card->qdio.no_out_queues - 1); |
3820 | if (card->qdio.do_prio_queueing && (ipv == 4)) { | 3823 | if (card->qdio.do_prio_queueing && (ipv == 4)) { |
3824 | const u8 tos = ip_hdr(skb)->tos; | ||
3825 | |||
3821 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_TOS){ | 3826 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_TOS){ |
3822 | if (skb->nh.iph->tos & IP_TOS_NOTIMPORTANT) | 3827 | if (tos & IP_TOS_NOTIMPORTANT) |
3823 | return 3; | 3828 | return 3; |
3824 | if (skb->nh.iph->tos & IP_TOS_HIGHRELIABILITY) | 3829 | if (tos & IP_TOS_HIGHRELIABILITY) |
3825 | return 2; | 3830 | return 2; |
3826 | if (skb->nh.iph->tos & IP_TOS_HIGHTHROUGHPUT) | 3831 | if (tos & IP_TOS_HIGHTHROUGHPUT) |
3827 | return 1; | 3832 | return 1; |
3828 | if (skb->nh.iph->tos & IP_TOS_LOWDELAY) | 3833 | if (tos & IP_TOS_LOWDELAY) |
3829 | return 0; | 3834 | return 0; |
3830 | } | 3835 | } |
3831 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_PREC) | 3836 | if (card->qdio.do_prio_queueing==QETH_PRIO_Q_ING_PREC) |
3832 | return 3 - (skb->nh.iph->tos >> 6); | 3837 | return 3 - (tos >> 6); |
3833 | } else if (card->qdio.do_prio_queueing && (ipv == 6)) { | 3838 | } else if (card->qdio.do_prio_queueing && (ipv == 6)) { |
3834 | /* TODO: IPv6!!! */ | 3839 | /* TODO: IPv6!!! */ |
3835 | } | 3840 | } |
@@ -3866,9 +3871,9 @@ __qeth_prepare_skb(struct qeth_card *card, struct sk_buff *skb, int ipv) | |||
3866 | * memcpys instead of one memmove to save cycles. | 3871 | * memcpys instead of one memmove to save cycles. |
3867 | */ | 3872 | */ |
3868 | skb_push(skb, VLAN_HLEN); | 3873 | skb_push(skb, VLAN_HLEN); |
3869 | memcpy(skb->data, skb->data + 4, 4); | 3874 | skb_copy_to_linear_data(skb, skb->data + 4, 4); |
3870 | memcpy(skb->data + 4, skb->data + 8, 4); | 3875 | skb_copy_to_linear_data_offset(skb, 4, skb->data + 8, 4); |
3871 | memcpy(skb->data + 8, skb->data + 12, 4); | 3876 | skb_copy_to_linear_data_offset(skb, 8, skb->data + 12, 4); |
3872 | tag = (u16 *)(skb->data + 12); | 3877 | tag = (u16 *)(skb->data + 12); |
3873 | /* | 3878 | /* |
3874 | * first two bytes = ETH_P_8021Q (0x8100) | 3879 | * first two bytes = ETH_P_8021Q (0x8100) |
@@ -4039,7 +4044,8 @@ qeth_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
4039 | *((u32 *) skb->dst->neighbour->primary_key); | 4044 | *((u32 *) skb->dst->neighbour->primary_key); |
4040 | } else { | 4045 | } else { |
4041 | /* fill in destination address used in ip header */ | 4046 | /* fill in destination address used in ip header */ |
4042 | *((u32 *) (&hdr->hdr.l3.dest_addr[12])) = skb->nh.iph->daddr; | 4047 | *((u32 *)(&hdr->hdr.l3.dest_addr[12])) = |
4048 | ip_hdr(skb)->daddr; | ||
4043 | } | 4049 | } |
4044 | } else if (ipv == 6) { /* IPv6 or passthru */ | 4050 | } else if (ipv == 6) { /* IPv6 or passthru */ |
4045 | hdr->hdr.l3.flags = qeth_get_qeth_hdr_flags6(cast_type); | 4051 | hdr->hdr.l3.flags = qeth_get_qeth_hdr_flags6(cast_type); |
@@ -4048,7 +4054,8 @@ qeth_fill_header(struct qeth_card *card, struct qeth_hdr *hdr, | |||
4048 | skb->dst->neighbour->primary_key, 16); | 4054 | skb->dst->neighbour->primary_key, 16); |
4049 | } else { | 4055 | } else { |
4050 | /* fill in destination address used in ip header */ | 4056 | /* fill in destination address used in ip header */ |
4051 | memcpy(hdr->hdr.l3.dest_addr, &skb->nh.ipv6h->daddr, 16); | 4057 | memcpy(hdr->hdr.l3.dest_addr, |
4058 | &ipv6_hdr(skb)->daddr, 16); | ||
4052 | } | 4059 | } |
4053 | } else { /* passthrough */ | 4060 | } else { /* passthrough */ |
4054 | if((skb->dev->type == ARPHRD_IEEE802_TR) && | 4061 | if((skb->dev->type == ARPHRD_IEEE802_TR) && |
diff --git a/drivers/s390/net/qeth_tso.h b/drivers/s390/net/qeth_tso.h index 14504afb044e..c20e923cf9ad 100644 --- a/drivers/s390/net/qeth_tso.h +++ b/drivers/s390/net/qeth_tso.h | |||
@@ -40,8 +40,8 @@ qeth_tso_fill_header(struct qeth_card *card, struct sk_buff *skb) | |||
40 | QETH_DBF_TEXT(trace, 5, "tsofhdr"); | 40 | QETH_DBF_TEXT(trace, 5, "tsofhdr"); |
41 | 41 | ||
42 | hdr = (struct qeth_hdr_tso *) skb->data; | 42 | hdr = (struct qeth_hdr_tso *) skb->data; |
43 | iph = skb->nh.iph; | 43 | iph = ip_hdr(skb); |
44 | tcph = skb->h.th; | 44 | tcph = tcp_hdr(skb); |
45 | /*fix header to TSO values ...*/ | 45 | /*fix header to TSO values ...*/ |
46 | hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO; | 46 | hdr->hdr.hdr.l3.id = QETH_HEADER_TYPE_TSO; |
47 | /*set values which are fix for the first approach ...*/ | 47 | /*set values which are fix for the first approach ...*/ |
@@ -63,13 +63,9 @@ qeth_tso_fill_header(struct qeth_card *card, struct sk_buff *skb) | |||
63 | static inline void | 63 | static inline void |
64 | qeth_tso_set_tcpip_header(struct qeth_card *card, struct sk_buff *skb) | 64 | qeth_tso_set_tcpip_header(struct qeth_card *card, struct sk_buff *skb) |
65 | { | 65 | { |
66 | struct iphdr *iph; | 66 | struct iphdr *iph = ip_hdr(skb); |
67 | struct ipv6hdr *ip6h; | 67 | struct ipv6hdr *ip6h = ipv6_hdr(skb); |
68 | struct tcphdr *tcph; | 68 | struct tcphdr *tcph = tcp_hdr(skb); |
69 | |||
70 | iph = skb->nh.iph; | ||
71 | ip6h = skb->nh.ipv6h; | ||
72 | tcph = skb->h.th; | ||
73 | 69 | ||
74 | tcph->check = 0; | 70 | tcph->check = 0; |
75 | if (skb->protocol == ETH_P_IPV6) { | 71 | if (skb->protocol == ETH_P_IPV6) { |