]> git.baikalelectronics.ru Git - kernel.git/commit
qede: Don't try removing unconfigured vlans
authorYuval Mintz <Yuval.Mintz@qlogic.com>
Wed, 27 Jul 2016 11:45:19 +0000 (14:45 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 31 Jul 2016 03:33:53 +0000 (20:33 -0700)
commitb6e826c78b1be9acf775814bb2ead471e1982876
tree231c33f5402f041f4d824c0952d5cbcd06dd9904
parentac73b3dde3377f2fee1351100e4c500c7ebe5553
qede: Don't try removing unconfigured vlans

As part of ndo_vlan_rx_kill_vid() implementation,
qede is requesting firmware to remove the vlan filter.
This currently happens even if the vlan wasn't previously
added [In case device ran out of vlan credits].

For PFs this doesn't cause any issues as the firmware
would simply ignore the removal request. But for VFs their
parent PF is holding an accounting of the configured vlans,
and such a request would cause the PF to fail the VF's
removal request.

Simply fix this for both PFs & VFs and don't remove filters
that were not previously added.

Fixes: 0e92a3aba52e4 ("qede: Add vlan filtering offload support")
Signed-off-by: Yuval Mintz <Yuval.Mintz@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede_main.c