Commit e9882208 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

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: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27248d57
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment