Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 634ec36c authored by David Thomson's avatar David Thomson Committed by David S. Miller
Browse files

net: phy: Pass mdix ethtool setting through to phy driver



Pass the mdix setting from ethtool down to the phy driver, to allow
driver specific implementations of manually setting the polarity.

Signed-off-by: default avatarDavid Thomson <david.thomson@alliedtelesis.co.nz>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a4e2405c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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);

+2 −0
Original line number Diff line number Diff line
@@ -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)