diff mbox series

[net-next,v2,3/3] r8169: don't wakeup-enable device on shutdown if WOL is disabled

Message ID a177aed9-fc27-9bac-c42a-941528559fd1@gmail.com
State New
Headers show
Series [net-next,v2,1/3] r8169: replace BUG_ON with WARN in _rtl_eri_write | expand

Commit Message

Heiner Kallweit Jan. 8, 2021, noon UTC
If WOL isn't enabled, then there's no need to enable wakeup from D3
on system shutdown.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/realtek/r8169_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c
index 6005d37b6..982e6b2f0 100644
--- a/drivers/net/ethernet/realtek/r8169_main.c
+++ b/drivers/net/ethernet/realtek/r8169_main.c
@@ -4876,7 +4876,7 @@  static void rtl_shutdown(struct pci_dev *pdev)
 			rtl_wol_shutdown_quirk(tp);
 		}
 
-		pci_wake_from_d3(pdev, true);
+		pci_wake_from_d3(pdev, tp->saved_wolopts);
 		pci_set_power_state(pdev, PCI_D3hot);
 	}
 }