2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00

r8169: don't check WoL when powering down PHY and interface is down

We can power down the PHY irregardless of WOL settings if interface
is down. So far we would have left the PHY enabled if WOL options
are set and the interface is brought down.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Heiner Kallweit 2018-06-24 18:40:23 +02:00 committed by David S. Miller
parent 433f9d0ddc
commit fe87bef01f

View File

@ -4635,7 +4635,7 @@ static void rtl_wol_suspend_quirk(struct rtl8169_private *tp)
static bool rtl_wol_pll_power_down(struct rtl8169_private *tp)
{
if (!tp->saved_wolopts)
if (!netif_running(tp->dev) || !tp->saved_wolopts)
return false;
rtl_speed_down(tp);