diff options
author | Daode Huang <huangdaode@hisilicon.com> | 2017-04-01 12:03:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-04-03 14:48:43 -0700 |
commit | 4b7cdecaa441bc296a507371766109624c177ec0 (patch) | |
tree | 1ef00df6b3fb00d5c81eaa7640c8411e94cbcaa6 /drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | |
parent | fb0672d11634dd072bfb66a0b546b4fc592f4158 (diff) | |
download | linux-4b7cdecaa441bc296a507371766109624c177ec0.tar.bz2 |
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: 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>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c index 3ac2183dbd21..3404eacaed7f 100644 --- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c @@ -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) |