diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2020-06-17 22:52:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-18 20:38:36 -0700 |
commit | e9882208ae989116b6ea166ef743111ea4a5248f (patch) | |
tree | 87f63c2a46923b98eea92f5496064fe9d56015e8 /drivers/net/ethernet/realtek | |
parent | 27248d57c88af1eede1619eaa3423b424da06b29 (diff) | |
download | linux-e9882208ae989116b6ea166ef743111ea4a5248f.tar.bz2 |
r8169: improve setting WoL on runtime-resume
In the following scenario WoL isn't configured properly:
- Driver is loaded, interface isn't brought up within 10s, so driver
runtime-suspends.
- WoL is set.
- Interface is brought up, stored WoL setting isn't applied.
It has always been like that, but the scenario seems to be quite
theoretical as I haven't seen any bug report yet. Therefore treat
the change as an improvement.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/realtek')
-rw-r--r-- | drivers/net/ethernet/realtek/r8169_main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/realtek/r8169_main.c b/drivers/net/ethernet/realtek/r8169_main.c index 4bc6c5529344..bd95c0ae6536 100644 --- a/drivers/net/ethernet/realtek/r8169_main.c +++ b/drivers/net/ethernet/realtek/r8169_main.c @@ -4887,14 +4887,12 @@ static int rtl8169_runtime_resume(struct device *device) rtl_rar_set(tp, tp->dev->dev_addr); - if (!tp->TxDescArray) - return 0; - rtl_lock_work(tp); __rtl8169_set_wol(tp, tp->saved_wolopts); rtl_unlock_work(tp); - __rtl8169_resume(tp); + if (tp->TxDescArray) + __rtl8169_resume(tp); return 0; } |