aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/stmicro
diff options
context:
space:
mode:
authorJose Abreu <Jose.Abreu@synopsys.com>2020-01-14 17:09:22 +0100
committerDavid S. Miller <davem@davemloft.net>2020-01-15 23:11:18 +0100
commitd39b68e5a736afa67d2e9cfb158efdd237d99dbd (patch)
tree89e94a37369d021f7b6c9aeeb4f83224fc187281 /drivers/net/ethernet/stmicro
parentnet: stmmac: selftests: Make it work in Synopsys AXS101 boards (diff)
downloadlinux-dev-d39b68e5a736afa67d2e9cfb158efdd237d99dbd.tar.xz
linux-dev-d39b68e5a736afa67d2e9cfb158efdd237d99dbd.zip
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: 94e18382003c ("net: stmmac: selftests: Add selftest for VLAN TX Offload") Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
index 6516d65e84b8..7edee3c87ac9 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
@@ -853,8 +853,12 @@ 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);