Skip to content

Commit

Permalink
net: hns: bug fix of ethtool show the speed
Browse files Browse the repository at this point in the history
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: Daode Huang <huangdaode@hisilicon.com>
Reviewed-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daode Huang authored and David S. Miller committed Apr 3, 2017
1 parent fb0672d commit 4b7cdec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static int hns_nic_get_link_ksettings(struct net_device *net_dev,

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

if (net_dev->phydev)
Expand Down

0 comments on commit 4b7cdec

Please sign in to comment.