Commit afbe17a3 authored by LABBE Corentin's avatar LABBE Corentin Committed by David S. Miller

net-next: stmmac: use SPEED_xxx instead of raw value

Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 50cb16d4
...@@ -802,12 +802,12 @@ static void stmmac_adjust_link(struct net_device *dev) ...@@ -802,12 +802,12 @@ static void stmmac_adjust_link(struct net_device *dev)
if (phydev->speed != priv->speed) { if (phydev->speed != priv->speed) {
new_state = true; new_state = true;
switch (phydev->speed) { switch (phydev->speed) {
case 1000: case SPEED_1000:
if (priv->plat->has_gmac || if (priv->plat->has_gmac ||
priv->plat->has_gmac4) priv->plat->has_gmac4)
ctrl &= ~priv->hw->link.port; ctrl &= ~priv->hw->link.port;
break; break;
case 100: case SPEED_100:
if (priv->plat->has_gmac || if (priv->plat->has_gmac ||
priv->plat->has_gmac4) { priv->plat->has_gmac4) {
ctrl |= priv->hw->link.port; ctrl |= priv->hw->link.port;
...@@ -816,7 +816,7 @@ static void stmmac_adjust_link(struct net_device *dev) ...@@ -816,7 +816,7 @@ static void stmmac_adjust_link(struct net_device *dev)
ctrl &= ~priv->hw->link.port; ctrl &= ~priv->hw->link.port;
} }
break; break;
case 10: case SPEED_10:
if (priv->plat->has_gmac || if (priv->plat->has_gmac ||
priv->plat->has_gmac4) { priv->plat->has_gmac4) {
ctrl |= priv->hw->link.port; ctrl |= priv->hw->link.port;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment