Skip to content

Commit

Permalink
r8169: don't check WoL when powering down PHY and interface is down
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hkallweit authored and davem330 committed Jun 25, 2018
1 parent 433f9d0 commit fe87bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fe87bef

Please sign in to comment.