Skip to content

Commit

Permalink
be2net: don't delete MAC on close on unprivileged BE3 VFs
Browse files Browse the repository at this point in the history
BE3 VFs without FILTMGMT privilege are not allowed to modify its MAC,
VLAN table and UC/MC lists. So don't try to delete MAC on such VFs.

Cc: Sathya Perla <sathya.perla@broadcom.com>
Cc: Ajit Khaparde <ajit.khaparde@broadcom.com>
Cc: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
Cc: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Ivan Vecera <cera@cera.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ivan Vecera authored and David S. Miller committed Jan 16, 2017
1 parent fe68d8b commit 6d928ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/ethernet/emulex/benet/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -3609,7 +3609,11 @@ static void be_rx_qs_destroy(struct be_adapter *adapter)

static void be_disable_if_filters(struct be_adapter *adapter)
{
be_dev_mac_del(adapter, adapter->pmac_id[0]);
/* Don't delete MAC on BE3 VFs without FILTMGMT privilege */
if (!BEx_chip(adapter) || !be_virtfn(adapter) ||
check_privilege(adapter, BE_PRIV_FILTMGMT))
be_dev_mac_del(adapter, adapter->pmac_id[0]);

be_clear_uc_list(adapter);
be_clear_mc_list(adapter);

Expand Down

0 comments on commit 6d928ae

Please sign in to comment.