net: hns3: fix RMW issue for VLAN filter switch
authorJian Shen <shenjian15@huawei.com>
Thu, 12 Mar 2020 07:11:05 +0000 (15:11 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Mar 2020 18:38:26 +0000 (11:38 -0700)
commit903b85d3adce99a5301d5959c4d3c9d14a7974d4
tree63e5c49d1cc48386a1a9fd613ee94a3d41874a8a
parent23b4201dead410c4a5108a8e723240419ab75257
net: hns3: fix RMW issue for VLAN filter switch

According to the user manual, the ingress and egress VLAN filter
are configured at the same time. Currently, hclge_init_vlan_config()
and hclge_set_vlan_spoofchk() will both change the VLAN filter
switch. So it's necessary to read the old configuration before
modifying it.

Fixes: 22044f95faa0 ("net: hns3: add support for spoof check setting")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c