Skip to content

Commit

Permalink
net-next: stmmac: use SPEED_xxx instead of raw value
Browse files Browse the repository at this point in the history
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
LABBE Corentin authored and David S. Miller committed May 25, 2017
1 parent 50cb16d commit afbe17a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -802,12 +802,12 @@ static void stmmac_adjust_link(struct net_device *dev)
if (phydev->speed != priv->speed) {
new_state = true;
switch (phydev->speed) {
case 1000:
case SPEED_1000:
if (priv->plat->has_gmac ||
priv->plat->has_gmac4)
ctrl &= ~priv->hw->link.port;
break;
case 100:
case SPEED_100:
if (priv->plat->has_gmac ||
priv->plat->has_gmac4) {
ctrl |= priv->hw->link.port;
Expand All @@ -816,7 +816,7 @@ static void stmmac_adjust_link(struct net_device *dev)
ctrl &= ~priv->hw->link.port;
}
break;
case 10:
case SPEED_10:
if (priv->plat->has_gmac ||
priv->plat->has_gmac4) {
ctrl |= priv->hw->link.port;
Expand Down

0 comments on commit afbe17a

Please sign in to comment.