]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: cleanup mac auto-negotiation state query in hclge_update_speed_duplex
authorFuyun Liang <liangfuyun1@huawei.com>
Wed, 8 Nov 2017 07:52:23 +0000 (15:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Nov 2017 06:17:56 +0000 (15:17 +0900)
commit3df4dd0cd8b5e4ff50ce9c657daf3522da0cbeb5
tree5f518f58026c9126dbe51f9d6ee71e416743346f
parent11e748b020b47b63bcfba5d2f19e348907e3f63b
net: hns3: cleanup mac auto-negotiation state query in hclge_update_speed_duplex

When checking whether auto-negotiation is on, driver only needs to
check the value of mac.autoneg(SW) directly, and does not need to
query it from hardware. Because this value is always synchronized
with the auto-negotiation state of hardware.

This patch removes mac auto-negotiation state query in
hclge_update_speed_duplex().

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