From: Jian Shen Date: Sat, 2 Feb 2019 14:39:35 +0000 (+0800) Subject: net: hns3: don't allow user to change vlan filter state X-Git-Tag: v5.1-rc1~178^2~374^2~2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=77af09c6780b1394a1e888a6862d49cadc0247fa;p=uclinux-h8%2Flinux.git net: hns3: don't allow user to change vlan filter state When user disables vlan filter, and adds vlan device, it won't notify the driver the update the vlan filter. In this case, when user enables vlan filter again, the packets with new vlan tag will be filtered by vlan filter. Signed-off-by: Jian Shen Signed-off-by: Peng Li Signed-off-by: Huazhong Tan Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index db06d36d408f..40b17223ee41 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -1929,8 +1929,7 @@ static void hns3_set_default_feature(struct net_device *netdev) NETIF_F_GSO_UDP_TUNNEL_CSUM | NETIF_F_SCTP_CRC; if (pdev->revision >= 0x21) { - netdev->hw_features |= NETIF_F_HW_VLAN_CTAG_FILTER | - NETIF_F_GRO_HW; + netdev->hw_features |= NETIF_F_GRO_HW; netdev->features |= NETIF_F_GRO_HW; if (!(h->flags & HNAE3_SUPPORT_VF)) {