OSDN Git Service

net: hns3: Fix error of checking used vlan id
authorJian Shen <shenjian15@huawei.com>
Mon, 3 Sep 2018 10:21:48 +0000 (11:21 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Sep 2018 05:04:45 +0000 (22:04 -0700)
commit54e97d117bafa161b08c6ade243a335d92890d94
treeee6338e125ccecf52050a4612e176446bc996c2d
parentfd5f9da3f6583046215d614a87792b46e55785e2
net: hns3: Fix error of checking used vlan id

PF uses hdev->vlan_table to manage the port vlan table. In function
hclge_set_vlan_filter_hw(), it checks whether a vlan id has been used,
by foreach all the vport bits. It should use macro HCLGE_VPORT_NUM,
not VLAN_N_VID as the foreach condition.

Fixes: 6c251711b37f ("net: hns3: Disable vf vlan filter when vf vlan table is full")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c