Fix a logic error which resulted in putting PHY into sleep when WOL

is active.  If WOL is active driver should not put PHY into sleep.
This change makes WOL work on RTL8168E.
This commit is contained in:
Pyun YongHyeon 2012-01-19 20:13:16 +00:00
parent 2a2443d833
commit bc6b129bcd

View File

@ -3808,7 +3808,7 @@ re_setwol(struct rl_softc *sc)
/* Config register write done. */
CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF);
if ((ifp->if_capenable & IFCAP_WOL) != 0 &&
if ((ifp->if_capenable & IFCAP_WOL) == 0 &&
(sc->rl_flags & RL_FLAG_PHYWAKE_PM) != 0)
CSR_WRITE_1(sc, RL_PMCH, CSR_READ_1(sc, RL_PMCH) & ~0x80);
/*