mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
net: stmmac: selftests: Mark as fail when received VLAN ID != expected
commitd39b68e5a7upstream. When the VLAN ID does not match the expected one it means filter failed in HW. Fix it. Fixes:94e1838200("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a67039cb14
commit
2a3e4499a5
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user