aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorStefan Raspl <raspl@linux.vnet.ibm.com>2014-03-19 02:58:02 -0400
committerDavid S. Miller <davem@davemloft.net>2014-03-20 00:06:56 -0400
commita9baf10aafe7001501189099df4b91f90739e182 (patch)
tree4a69b101aed52cc458bdd1920374c45b8141c3ea /drivers/s390
parent43934077b085151e1f6b19b45d7179760e8fa63d (diff)
qeth: Fix IP version detection for VLAN traffic
The current code would always return 0 for VLAN-encapsulated IP traffic. One notable side effect was that VLAN traffic would never get prioritized on OSD and OSX devices when priority queueing modes prio_queueing_tos or prio_queueing_prec were enabled. Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/qeth_core.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/s390/net/qeth_core.h b/drivers/s390/net/qeth_core.h
index a0de045eb227..5333b2c018e7 100644
--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -854,8 +854,11 @@ static inline int qeth_get_micros(void)
854 854
855static inline int qeth_get_ip_version(struct sk_buff *skb) 855static inline int qeth_get_ip_version(struct sk_buff *skb)
856{ 856{
857 struct ethhdr *ehdr = (struct ethhdr *)skb->data; 857 __be16 *p = &((struct ethhdr *)skb->data)->h_proto;
858 switch (ehdr->h_proto) { 858
859 if (*p == ETH_P_8021Q)
860 p += 2;
861 switch (*p) {
859 case ETH_P_IPV6: 862 case ETH_P_IPV6:
860 return 6; 863 return 6;
861 case ETH_P_IP: 864 case ETH_P_IP: