From 9dbb0ed862e355d4a3211b95b704f5eb3bf1eb79 Mon Sep 17 00:00:00 2001 From: Frank Blaschka Date: Mon, 8 Mar 2010 20:36:54 +0000 Subject: [PATCH] --- yaml --- r: 187983 b: refs/heads/master c: 21fde749cbf71d03e8cf87a7a9a45349597e138a h: refs/heads/master i: 187981: 31c39bbeba610d83b07ec25241f87afb9bd012ae 187979: b96e0d2277acb0ce07ff61a3142cf0069651b9f9 187975: 26f8059206a61e7738b1cb98e0f33453f554e1d9 187967: 4d4a89995c1d70b56216f1383d0120f2f57be751 v: v3 --- [refs] | 2 +- trunk/drivers/s390/net/qeth_core.h | 3 ++- trunk/drivers/s390/net/qeth_l3_main.c | 10 ++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index e1e1e2eaef8d..f76ef05777ab 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fe7a26257a4191de6047f7e1d38832472eb22f85 +refs/heads/master: 21fde749cbf71d03e8cf87a7a9a45349597e138a diff --git a/trunk/drivers/s390/net/qeth_core.h b/trunk/drivers/s390/net/qeth_core.h index a3ac4456e0b1..fcd005aad989 100644 --- a/trunk/drivers/s390/net/qeth_core.h +++ b/trunk/drivers/s390/net/qeth_core.h @@ -763,7 +763,8 @@ static inline int qeth_get_micros(void) static inline int qeth_get_ip_version(struct sk_buff *skb) { - switch (skb->protocol) { + struct ethhdr *ehdr = (struct ethhdr *)skb->data; + switch (ehdr->h_proto) { case ETH_P_IPV6: return 6; case ETH_P_IP: diff --git a/trunk/drivers/s390/net/qeth_l3_main.c b/trunk/drivers/s390/net/qeth_l3_main.c index 5475834ab916..42fe92c08c29 100644 --- a/trunk/drivers/s390/net/qeth_l3_main.c +++ b/trunk/drivers/s390/net/qeth_l3_main.c @@ -2900,10 +2900,8 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) int data_offset = -1; int nr_frags; - if ((card->info.type == QETH_CARD_TYPE_IQD) && - (((skb->protocol != htons(ETH_P_IPV6)) && - (skb->protocol != htons(ETH_P_IP))) || - card->options.sniffer)) + if (((card->info.type == QETH_CARD_TYPE_IQD) && (!ipv)) || + card->options.sniffer) goto tx_drop; if ((card->state != CARD_STATE_UP) || !card->lan_online) { @@ -2949,14 +2947,14 @@ static int qeth_l3_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) if (data_offset < 0) skb_pull(new_skb, ETH_HLEN); } else { - if (new_skb->protocol == htons(ETH_P_IP)) { + if (ipv == 4) { if (card->dev->type == ARPHRD_IEEE802_TR) skb_pull(new_skb, TR_HLEN); else skb_pull(new_skb, ETH_HLEN); } - if (new_skb->protocol == ETH_P_IPV6 && card->vlangrp && + if (ipv == 6 && card->vlangrp && vlan_tx_tag_present(new_skb)) { skb_push(new_skb, VLAN_HLEN); skb_copy_to_linear_data(new_skb, new_skb->data + 4, 4);