]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: ice: fix error NETIF_F_HW_VLAN_CTAG_FILTER check in ice_vsi_sync_fltr()
authorJian Shen <shenjian15@huawei.com>
Fri, 29 Jul 2022 10:17:54 +0000 (18:17 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:41:16 +0000 (14:41 +0200)
[ Upstream commit 7dc839fe47611e6995f370cae37b9797cf7d2672 ]

vsi->current_netdev_flags is used store the current net device
flags, not the active netdevice features. So it should use
vsi->netdev->featurs, rather than vsi->current_netdev_flags
to check NETIF_F_HW_VLAN_CTAG_FILTER.

Fixes: 1babaf77f49d ("ice: Advertise 802.1ad VLAN filtering and offloads for PF netdev")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Guangbin Huang <huangguangbin2@huawei.com>
Acked-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/ice/ice_main.c

index 522462f41067a12603bf6347a8699c61835c732f..f48938af960c12fd086b06a63793ab034e9aa707 100644 (file)
@@ -419,7 +419,7 @@ static int ice_vsi_sync_fltr(struct ice_vsi *vsi)
                                                IFF_PROMISC;
                                        goto out_promisc;
                                }
-                               if (vsi->current_netdev_flags &
+                               if (vsi->netdev->features &
                                    NETIF_F_HW_VLAN_CTAG_FILTER)
                                        vlan_ops->ena_rx_filtering(vsi);
                        }