From: Daode Huang Date: Sat, 1 Apr 2017 11:03:35 +0000 (+0100) Subject: net: hns: bug fix of ethtool show the speed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4b7cdecaa441bc296a507371766109624c177ec0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Yisen Zhuang Signed-off-by: Salil Mehta Signed-off-by: David S. Miller --- 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)