]> git.baikalelectronics.ru Git - kernel.git/commitdiff
r8169: don't wakeup-enable device on shutdown if WOL is disabled
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 8 Jan 2021 12:00:13 +0000 (13:00 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sun, 10 Jan 2021 02:07:53 +0000 (18:07 -0800)
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>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/realtek/r8169_main.c

index 755767b7e7e7ece40cc04bfa22abc9bcc2925bd8..f06e130512a83da8e56c1a8678eba54042b06851 100644 (file)
@@ -4892,7 +4892,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);
        }
 }