Skip to content

Commit

Permalink
net: phy: fix a bug when verify the EEE support
Browse files Browse the repository at this point in the history
The phy_init_eee has to exit with an error when the
local device and its link partner both do not support EEE.
So this patch fixes a problem when verify this.

Signed-off-by: Giuseppe Cavallaro <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Giuseppe CAVALLARO authored and davem330 committed May 28, 2013
1 parent a622260 commit 9a9c56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1044,7 +1044,7 @@ int phy_init_eee(struct phy_device *phydev, bool clk_stop_enable)
adv = mmd_eee_adv_to_ethtool_adv_t(eee_adv);
lp = mmd_eee_adv_to_ethtool_adv_t(eee_lp);
idx = phy_find_setting(phydev->speed, phydev->duplex);
if ((lp & adv & settings[idx].setting))
if (!(lp & adv & settings[idx].setting))
goto eee_exit;

if (clk_stop_enable) {
Expand Down

0 comments on commit 9a9c56c

Please sign in to comment.