]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: Mask the packet statistics query when NIC is down
authorJian Shen <shenjian15@huawei.com>
Fri, 5 Jan 2018 10:18:11 +0000 (18:18 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 8 Jan 2018 19:06:18 +0000 (14:06 -0500)
commitf53996a62e9be9b31e1623435e040ad50a0fde4f
tree7f245cf71131c722acafc07e9fae38720195b2de
parentab5b83b3af79469e92cf7a3ff77b803c04ecf559
net: hns3: Mask the packet statistics query when NIC is down

Update the HNS3_NIC_STATE_DOWN bit when NIC state changes.
When NIC is down, mask the packet statistics for querying
with ifconfig command. It's a common practice.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c