Skip to content

Commit

Permalink
net: phy: Pass mdix ethtool setting through to phy driver
Browse files Browse the repository at this point in the history
Pass the mdix setting from ethtool down to the phy driver, to allow
driver specific implementations of manually setting the polarity.

Signed-off-by: David Thomson <david.thomson@alliedtelesis.co.nz>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David Thomson authored and David S. Miller committed Jul 11, 2015
1 parent a4e2405 commit 634ec36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,8 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd)

phydev->duplex = cmd->duplex;

phydev->mdix = cmd->eth_tp_mdix_ctrl;

/* Restart the PHY */
phy_start_aneg(phydev);

Expand Down
2 changes: 2 additions & 0 deletions include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ struct phy_device {

struct net_device *attached_dev;

u8 mdix;

void (*adjust_link)(struct net_device *dev);
};
#define to_phy_device(d) container_of(d, struct phy_device, dev)
Expand Down

0 comments on commit 634ec36

Please sign in to comment.