diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c index c0e5dee86451..1df26c217f9a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_selftests.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -716,13 +715,13 @@ static int stmmac_test_flowctrl_validate(struct sk_buff *skb, static int stmmac_test_flowctrl(struct stmmac_priv *priv) { unsigned char paddr[ETH_ALEN] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x01}; - struct phy_device *phydev = priv->dev->phydev; u32 rx_cnt = priv->plat->rx_queues_to_use; + struct mac_device_info *mac = priv->hw; struct stmmac_test_priv *tpriv; unsigned int pkt_count; int i, ret = 0; - if (!phydev || (!phydev->pause && !phydev->asym_pause)) + if (!(mac->link.caps & MAC_SYM_PAUSE)) return -EOPNOTSUPP; tpriv = kzalloc_obj(*tpriv);