Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9baf10a authored by Stefan Raspl's avatar Stefan Raspl Committed by David S. Miller
Browse files

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: default avatarStefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 43934077
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -854,8 +854,11 @@ static inline int qeth_get_micros(void)

static inline int qeth_get_ip_version(struct sk_buff *skb)
{
	struct ethhdr *ehdr = (struct ethhdr *)skb->data;
	switch (ehdr->h_proto) {
	__be16 *p = &((struct ethhdr *)skb->data)->h_proto;

	if (*p == ETH_P_8021Q)
		p += 2;
	switch (*p) {
	case ETH_P_IPV6:
		return 6;
	case ETH_P_IP: