Skip to content

Commit 6fdc060

Browse files
logostdavem330
authored andcommitted
net: aquantia: fix removal of vlan 0
Due to absence of checking against the rx flow rule when vlan 0 is being removed, the other rule could be removed instead of the rule with vlan 0 Fixes: 7975d2a ("net: aquantia: add support of rx-vlan-filter offload") Signed-off-by: Dmitry Bogdanov <[email protected]> Signed-off-by: Igor Russkikh <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 154f4fb commit 6fdc060

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/aquantia/atlantic/aq_filters.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,8 @@ int aq_del_fvlan_by_vlan(struct aq_nic_s *aq_nic, u16 vlan_id)
431431
if (be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id)
432432
break;
433433
}
434-
if (rule && be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id) {
434+
if (rule && rule->type == aq_rx_filter_vlan &&
435+
be16_to_cpu(rule->aq_fsp.h_ext.vlan_tci) == vlan_id) {
435436
struct ethtool_rxnfc cmd;
436437

437438
cmd.fs.location = rule->aq_fsp.location;

0 commit comments

Comments
 (0)