Skip to content

Commit

Permalink
r8169: improve setting WoL on runtime-resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Jun 19, 2020
1 parent 27248d5 commit e988220
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/net/ethernet/realtek/r8169_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e988220

Please sign in to comment.