Skip to content

Commit 8f9d513

Browse files
Lekensteyndavem330
authored andcommitted
r8169: remember WOL preferences on driver load
Do not clear Broadcast/Multicast/Unicast Wake Flag or LanWake in Config5. This is necessary to preserve WOL state when the driver is loaded. Although the r8168 vendor driver does not write Config5 (it has been commented out), Hayes Wang from Realtek said that masking bits like this is more sensible. Signed-off-by: Peter Wu <[email protected]> Acked-by: Francois Romieu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 18ebe5c commit 8f9d513

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

drivers/net/ethernet/realtek/r8169.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7088,7 +7088,7 @@ rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
70887088

70897089
RTL_W8(Cfg9346, Cfg9346_Unlock);
70907090
RTL_W8(Config1, RTL_R8(Config1) | PMEnable);
7091-
RTL_W8(Config5, RTL_R8(Config5) & PMEStatus);
7091+
RTL_W8(Config5, RTL_R8(Config5) & (BWF | MWF | UWF | LanWake | PMEStatus));
70927092
if ((RTL_R8(Config3) & (LinkUp | MagicPacket)) != 0)
70937093
tp->features |= RTL_FEATURE_WOL;
70947094
if ((RTL_R8(Config5) & (UWF | BWF | MWF)) != 0)

0 commit comments

Comments
 (0)