]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
TG3: &&/|| confusion
authorRoel Kluin <roel.kluin@gmail.com>
Thu, 19 Feb 2009 01:42:42 +0000 (17:42 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Feb 2009 01:42:42 +0000 (17:42 -0800)
phyid Can't be both TG3_PHY_OUI_1 and TG3_PHY_OUI_2 and TG3_PHY_OUI_3.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/tg3.c

index 4595962fb8e1b0f74385fc25cc6d28d57846f878..b080f9493d83fe70a22dd236e3eaf045ca4aaf03 100644 (file)
@@ -2237,8 +2237,8 @@ static int tg3_set_power_state(struct tg3 *tp, pci_power_t state)
                        phyid = phydev->drv->phy_id & phydev->drv->phy_id_mask;
                        if (phyid != TG3_PHY_ID_BCMAC131) {
                                phyid &= TG3_PHY_OUI_MASK;
-                               if (phyid == TG3_PHY_OUI_1 &&
-                                   phyid == TG3_PHY_OUI_2 &&
+                               if (phyid == TG3_PHY_OUI_1 ||
+                                   phyid == TG3_PHY_OUI_2 ||
                                    phyid == TG3_PHY_OUI_3)
                                        do_low_power = true;
                        }