net: stmmac: remove unnecessary priv->eee_enabled tests
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Wed, 5 Feb 2025 13:40:15 +0000 (13:40 +0000)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Feb 2025 19:56:09 +0000 (11:56 -0800)
commitfaafe39c77fbfb7001e8ed698eda15609f2745fc
tree751cfe6d91e49b23c125a916ffef9397c2a934ad
parent2cc8e6d308952abcc9bad8b88f28f9988a050135
net: stmmac: remove unnecessary priv->eee_enabled tests

Phylink will not call the mac_disable_tx_lpi() and mac_enable_tx_lpi()
methods randomly - the first method to be called will be the enable
method, and then after, the disable method will be called once between
subsequent enable calls. Thus there is a guaranteed ordering.

Therefore, we know the previous state of priv->eee_enabled, and can
remove it from both methods.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Link: https://patch.msgid.link/E1tffdX-003ZI5-UV@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c