net: stmmac: fixed operator typo
authorByungho An <bh74.an@samsung.com>
Fri, 28 Jun 2013 07:35:31 +0000 (16:35 +0900)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jul 2013 20:33:03 +0000 (13:33 -0700)
This patch fixed operator typo from & to ==.
Due to incorrect operator, the result is incorrect.

Signed-off-by: Byungho An <bh74.an@samsung.com>
Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index ee919ca8b8a0ad5828e84d7522d03218895d9b79..4fb74a07c01cc5206b1f660a0d78536cb6ca688e 100644 (file)
@@ -788,13 +788,13 @@ static void stmmac_check_pcs_mode(struct stmmac_priv *priv)
        int interface = priv->plat->interface;
 
        if (priv->dma_cap.pcs) {
-               if ((interface & PHY_INTERFACE_MODE_RGMII) ||
-                   (interface & PHY_INTERFACE_MODE_RGMII_ID) ||
-                   (interface & PHY_INTERFACE_MODE_RGMII_RXID) ||
-                   (interface & PHY_INTERFACE_MODE_RGMII_TXID)) {
+               if ((interface == PHY_INTERFACE_MODE_RGMII) ||
+                   (interface == PHY_INTERFACE_MODE_RGMII_ID) ||
+                   (interface == PHY_INTERFACE_MODE_RGMII_RXID) ||
+                   (interface == PHY_INTERFACE_MODE_RGMII_TXID)) {
                        pr_debug("STMMAC: PCS RGMII support enable\n");
                        priv->pcs = STMMAC_PCS_RGMII;
-               } else if (interface & PHY_INTERFACE_MODE_SGMII) {
+               } else if (interface == PHY_INTERFACE_MODE_SGMII) {
                        pr_debug("STMMAC: PCS SGMII support enable\n");
                        priv->pcs = STMMAC_PCS_SGMII;
                }