net: phy: broadcom: Only advertise EEE for supported modes
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 30 Mar 2021 22:00:24 +0000 (15:00 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:42:08 +0000 (08:42 +0200)
commitf295dfc831bc266810e354c59ec249eb6701d91d
tree2a83191530574dcddd5bc2b3fff22cd92071f83e
parent7a896e189361beade0b47cdb8ec8de5afe9d384b
net: phy: broadcom: Only advertise EEE for supported modes

[ Upstream commit c056d480b40a68f2520ccc156c7fae672d69d57d ]

We should not be advertising EEE for modes that we do not support,
correct that oversight by looking at the PHY device supported linkmodes.

Fixes: 99cec8a4dda2 ("net: phy: broadcom: Allow enabling or disabling of EEE")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/phy/bcm-phy-lib.c