mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
net: stmmac: selftests: Add missing checks for support of SA
Add checks for support of Source Address Insertion/Replacement before running the test. Signed-off-by: Jose Abreu <joabreu@synopsys.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
0079ad8e8d
commit
034c8fadba
1 changed files with 12 additions and 0 deletions
|
|
@ -1057,6 +1057,9 @@ static int stmmac_test_desc_sai(struct stmmac_priv *priv)
|
|||
struct stmmac_packet_attrs attr = { };
|
||||
int ret;
|
||||
|
||||
if (!priv->dma_cap.vlins)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
attr.remove_sa = true;
|
||||
attr.sarc = true;
|
||||
attr.src = src;
|
||||
|
|
@ -1076,6 +1079,9 @@ static int stmmac_test_desc_sar(struct stmmac_priv *priv)
|
|||
struct stmmac_packet_attrs attr = { };
|
||||
int ret;
|
||||
|
||||
if (!priv->dma_cap.vlins)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
attr.sarc = true;
|
||||
attr.src = src;
|
||||
attr.dst = priv->dev->dev_addr;
|
||||
|
|
@ -1094,6 +1100,9 @@ static int stmmac_test_reg_sai(struct stmmac_priv *priv)
|
|||
struct stmmac_packet_attrs attr = { };
|
||||
int ret;
|
||||
|
||||
if (!priv->dma_cap.vlins)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
attr.remove_sa = true;
|
||||
attr.sarc = true;
|
||||
attr.src = src;
|
||||
|
|
@ -1114,6 +1123,9 @@ static int stmmac_test_reg_sar(struct stmmac_priv *priv)
|
|||
struct stmmac_packet_attrs attr = { };
|
||||
int ret;
|
||||
|
||||
if (!priv->dma_cap.vlins)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
attr.sarc = true;
|
||||
attr.src = src;
|
||||
attr.dst = priv->dev->dev_addr;
|
||||
|
|
|
|||
Loading…
Reference in a new issue