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>
This commit is contained in:
Daode Huang 2017-04-01 12:03:35 +01:00 коммит произвёл David S. Miller
Родитель fb0672d116
Коммит 4b7cdecaa4
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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)