Skip to content

Commit 3bd8264

Browse files
hkallweitdavem330
authored andcommitted
r8169: fix WoL device wakeup enable
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>
1 parent 7314f54 commit 3bd8264

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/realtek

1 file changed

+2
-2
lines changed

drivers/net/ethernet/realtek/r8169.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,6 +1477,8 @@ static void __rtl8169_set_wol(struct rtl8169_private *tp, u32 wolopts)
14771477
}
14781478

14791479
RTL_W8(tp, Cfg9346, Cfg9346_Lock);
1480+
1481+
device_set_wakeup_enable(tp_to_dev(tp), wolopts);
14801482
}
14811483

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

14991501
rtl_unlock_work(tp);
15001502

1501-
device_set_wakeup_enable(d, tp->saved_wolopts);
1502-
15031503
pm_runtime_put_noidle(d);
15041504

15051505
return 0;

0 commit comments

Comments
 (0)