]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg
authorFuyun Liang <liangfuyun1@huawei.com>
Fri, 22 Dec 2017 04:21:50 +0000 (12:21 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Dec 2017 15:41:38 +0000 (10:41 -0500)
commit75312a64fd979fd6fbd3917645b913fc81330a7e
tree2e783efd45fad57ce38d21d27264a43c51e1c0a9
parentcaa01ac80fe46971177409bc25b57ae1422ebc37
net: hns3: fix for getting auto-negotiation state in hclge_get_autoneg

When phy exists, we use the value of phydev.autoneg to represent the
auto-negotiation state of hardware. Otherwise, we use the value of
mac.autoneg to represent it.

This patch fixes for getting a error value of auto-negotiation state in
hclge_get_autoneg().

Fixes: 22c0e2ce21dd ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c