Skip to content

Commit

Permalink
net: stmmac: selftests: Mark as fail when received VLAN ID != expected
Browse files Browse the repository at this point in the history
When the VLAN ID does not match the expected one it means filter failed
in HW. Fix it.

Fixes: 94e1838 ("net: stmmac: selftests: Add selftest for VLAN TX Offload")
Signed-off-by: Jose Abreu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
joabreu authored and davem330 committed Jan 15, 2020
1 parent 0b9f932 commit d39b68e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d39b68e

Please sign in to comment.