r8152: avoid the MCU to clear the lanwake
authorHayes Wang <hayeswang@realtek.com>
Wed, 22 Jan 2020 08:02:12 +0000 (16:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Feb 2020 21:22:50 +0000 (21:22 +0000)
commit510818ae0f388d333bd5c1554fbcee2d2a2e3b1e
tree2f461fa6b4293aea4fead614309956145f498827
parent3a128650b47aacded5867e46cad440a0cdf9cd41
r8152: avoid the MCU to clear the lanwake

[ Upstream commit 19813162895a696c5814d76e5f8fb6203d70f6e0 ]

Avoid the MCU to clear the lanwake after suspending. It may cause the
WOL fail. Disable LANWAKE_CLR_EN before suspending. Besides,enable it
and reset the lanwake status when resuming or initializing.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/usb/r8152.c