net: stmmac: reduce unnecessary wakeups from eee sw timer
authorJisheng Zhang <jszhang@kernel.org>
Sun, 23 Jan 2022 15:54:58 +0000 (23:54 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Feb 2022 11:56:14 +0000 (12:56 +0100)
commit50fe79589c149979c6223c0ff1a646b5102fefa8
tree8f1189f05f43e3aa32aa50fc6a11c14c34d04e8d
parent6207f35c213f6cb2fc3f13b5e77f08c710e1de19
net: stmmac: reduce unnecessary wakeups from eee sw timer

[ Upstream commit c74ead223deb88bdf18af8c772d7ca5a9b6c3c2b ]

Currently, on EEE capable platforms, if EEE SW timer is used, the SW
timer cause 1 wakeup/s even if the TX has successfully entered EEE.
Remove this unnecessary wakeup by only calling mod_timer() if we
haven't successfully entered EEE.

Signed-off-by: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c