Commit d39b68e5 authored by Jose Abreu's avatar Jose Abreu Committed by David S. Miller
Browse files

net: stmmac: selftests: Mark as fail when received VLAN ID != expected



When the VLAN ID does not match the expected one it means filter failed
in HW. Fix it.

Fixes: 94e18382 ("net: stmmac: selftests: Add selftest for VLAN TX Offload")
Signed-off-by: default avatarJose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0b9f932e
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -853,9 +853,13 @@ static int stmmac_test_vlan_validate(struct sk_buff *skb,
	if (tpriv->vlan_id) {
		if (skb->vlan_proto != htons(proto))
			goto out;
		if (skb->vlan_tci != tpriv->vlan_id)
		if (skb->vlan_tci != tpriv->vlan_id) {
			/* Means filter did not work. */
			tpriv->ok = false;
			complete(&tpriv->comp);
			goto out;
		}
	}

	ehdr = (struct ethhdr *)skb_mac_header(skb);
	if (!ether_addr_equal_unaligned(ehdr->h_dest, tpriv->packet->dst))