diff options
author | Rajesh Borundia <rajesh.borundia@qlogic.com> | 2010-08-31 17:17:50 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-01 10:41:56 -0700 |
commit | 7373373d100e5aebe751af0b2609a9a01dad5ac1 (patch) | |
tree | 3816ae48d6f3f33beeb20f2c66b2b4ab333dc1fa /drivers/net/qlcnic/qlcnic_ctx.c | |
parent | dcb50afff747d15fc2ffff762c08c325e4c229e5 (diff) |
qlcnic: fix mac override capability
o Rename mac_learning to mac_override
o Added check in set_mac to return error if mac override is disabled.
o Disabling mac_override only supported for Non priviledged functions.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_ctx.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ctx.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ctx.c b/drivers/net/qlcnic/qlcnic_ctx.c index bd4b06b2d86..95a821e0b66 100644 --- a/drivers/net/qlcnic/qlcnic_ctx.c +++ b/drivers/net/qlcnic/qlcnic_ctx.c @@ -1100,10 +1100,11 @@ __qlcnic_get_eswitch_port_config(struct qlcnic_adapter *adapter, *arg1 = QLCRD32(adapter, QLCNIC_ARG1_CRB_OFFSET); *arg2 = QLCRD32(adapter, QLCNIC_ARG2_CRB_OFFSET); dev_info(&adapter->pdev->dev, - "eSwitch port config for pci func%d\n", pci_func); + "eSwitch port config for pci func %d\n", pci_func); } else { dev_err(&adapter->pdev->dev, - "Failed to get eswitch port config%d\n", pci_func); + "Failed to get eswitch port config for pci func %d\n", + pci_func); } return err; } @@ -1142,7 +1143,7 @@ int qlcnic_config_switch_port(struct qlcnic_adapter *adapter, arg1 &= ~BIT_4; if (!(esw_cfg->promisc_mode)) arg1 &= ~BIT_6; - if (!(esw_cfg->mac_learning)) + if (!(esw_cfg->mac_override)) arg1 &= ~BIT_7; if (!(esw_cfg->mac_anti_spoof)) arg2 &= ~BIT_0; @@ -1175,10 +1176,10 @@ int qlcnic_config_switch_port(struct qlcnic_adapter *adapter, if (err != QLCNIC_RCODE_SUCCESS) { dev_err(&adapter->pdev->dev, - "Failed to configure eswitch port%d\n", pci_func); + "Failed to configure eswitch pci func %d\n", pci_func); } else { dev_info(&adapter->pdev->dev, - "Configured eSwitch for port %d\n", pci_func); + "Configured eSwitch for pci func %d\n", pci_func); } return err; @@ -1202,7 +1203,7 @@ qlcnic_get_eswitch_port_config(struct qlcnic_adapter *adapter, esw_cfg->discard_tagged = !!(arg1 & BIT_4); esw_cfg->host_vlan_tag = !!(arg1 & BIT_5); esw_cfg->promisc_mode = !!(arg1 & BIT_6); - esw_cfg->mac_learning = !!(arg1 & BIT_7); + esw_cfg->mac_override = !!(arg1 & BIT_7); esw_cfg->vlan_id = LSW(arg1 >> 16); esw_cfg->mac_anti_spoof = (arg2 & 0x1); esw_cfg->offload_flags = ((arg2 >> 1) & 0x7); |