aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index e0c6811610ab..9a3ebb8a8203 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -741,9 +741,9 @@ qlcnic_set_eswitch_port_features(struct qlcnic_adapter *adapter,
741 struct qlcnic_esw_func_cfg *esw_cfg) 741 struct qlcnic_esw_func_cfg *esw_cfg)
742{ 742{
743 adapter->flags &= ~QLCNIC_MACSPOOF; 743 adapter->flags &= ~QLCNIC_MACSPOOF;
744 if (adapter->op_mode == QLCNIC_NON_PRIV_FUNC) 744
745 if (esw_cfg->mac_anti_spoof) 745 if (esw_cfg->mac_anti_spoof)
746 adapter->flags |= QLCNIC_MACSPOOF; 746 adapter->flags |= QLCNIC_MACSPOOF;
747 747
748 qlcnic_set_netdev_features(adapter, esw_cfg); 748 qlcnic_set_netdev_features(adapter, esw_cfg);
749} 749}
@@ -3377,8 +3377,12 @@ static int
3377validate_esw_config(struct qlcnic_adapter *adapter, 3377validate_esw_config(struct qlcnic_adapter *adapter,
3378 struct qlcnic_esw_func_cfg *esw_cfg, int count) 3378 struct qlcnic_esw_func_cfg *esw_cfg, int count)
3379{ 3379{
3380 u32 op_mode;
3380 u8 pci_func; 3381 u8 pci_func;
3381 int i; 3382 int i;
3383
3384 op_mode = readl(adapter->ahw.pci_base0 + QLCNIC_DRV_OP_MODE);
3385
3382 for (i = 0; i < count; i++) { 3386 for (i = 0; i < count; i++) {
3383 pci_func = esw_cfg[i].pci_func; 3387 pci_func = esw_cfg[i].pci_func;
3384 if (pci_func >= QLCNIC_MAX_PCI_FUNC) 3388 if (pci_func >= QLCNIC_MAX_PCI_FUNC)
@@ -3390,6 +3394,9 @@ validate_esw_config(struct qlcnic_adapter *adapter,
3390 3394
3391 switch (esw_cfg[i].op_mode) { 3395 switch (esw_cfg[i].op_mode) {
3392 case QLCNIC_PORT_DEFAULTS: 3396 case QLCNIC_PORT_DEFAULTS:
3397 if (QLC_DEV_GET_DRV(op_mode, pci_func) !=
3398 QLCNIC_NON_PRIV_FUNC)
3399 esw_cfg[i].mac_anti_spoof = 0;
3393 break; 3400 break;
3394 case QLCNIC_ADD_VLAN: 3401 case QLCNIC_ADD_VLAN:
3395 if (!IS_VALID_VLAN(esw_cfg[i].vlan_id)) 3402 if (!IS_VALID_VLAN(esw_cfg[i].vlan_id))