net-next: stmmac: use SPEED_xxx instead of raw value
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Wed, 24 May 2017 07:16:45 +0000 (09:16 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 May 2017 17:08:34 +0000 (13:08 -0400)
Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index cd398bafb5e9632e4eb495f050d7a17202d052cf..e5538233686813981ede45a029b5722676a5423a 100644 (file)
@@ -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;
@@ -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;