Skip to content

Commit

Permalink
r8169: fix WoL device wakeup enable
Browse files Browse the repository at this point in the history
In rtl8169_runtime_resume() we configure WoL but don't set the device
to wakeup-enabled. This prevents PME generation once the cable is
re-plugged. Fix this by moving the call to device_set_wakeup_enable()
to __rtl8169_set_wol().

Fixes: 433f9d0 ("r8169: improve saved_wolopts handling")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Dec 31, 2018
1 parent 7314f54 commit 3bd8264
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/realtek/r8169.c
Original file line number Diff line number Diff line change
Expand Up @@ -1477,6 +1477,8 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts)
}

RTL_W8(tp, Cfg9346, Cfg9346_Lock);

device_set_wakeup_enable(tp_to_dev(tp), wolopts);
}

static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
Expand All @@ -1498,8 +1500,6 @@ static int rtl8169_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)

rtl_unlock_work(tp);

device_set_wakeup_enable(d, tp->saved_wolopts);

pm_runtime_put_noidle(d);

return 0;
Expand Down

0 comments on commit 3bd8264

Please sign in to comment.