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

Commit 4b7cdeca authored by Daode Huang's avatar Daode Huang Committed by David S. Miller
Browse files

net: hns: bug fix of ethtool show the speed



When run ethtool ethX on hns driver, the speed will show
as "Unknown". The base.speed is not correct assigned,
this patch fix this bug.

Signed-off-by: default avatarDaode Huang <huangdaode@hisilicon.com>
Reviewed-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: default avatarSalil Mehta <salil.mehta@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb0672d1
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -146,7 +146,7 @@ static int hns_nic_get_link_ksettings(struct net_device *net_dev,


	/* When there is no phy, autoneg is off. */
	/* When there is no phy, autoneg is off. */
	cmd->base.autoneg = false;
	cmd->base.autoneg = false;
	cmd->base.cmd = speed;
	cmd->base.speed = speed;
	cmd->base.duplex = duplex;
	cmd->base.duplex = duplex;


	if (net_dev->phydev)
	if (net_dev->phydev)