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>
diff --git a/drivers/net/qlcnic/qlcnic.h b/drivers/net/qlcnic/qlcnic.h
index 220370f..cd1a2e6 100644
--- a/drivers/net/qlcnic/qlcnic.h
+++ b/drivers/net/qlcnic/qlcnic.h
@@ -905,6 +905,7 @@
#define QLCNIC_ADAPTER_INITIALIZED 0x80
#define QLCNIC_TAGGING_ENABLED 0x100
#define QLCNIC_MACSPOOF 0x200
+#define QLCNIC_MAC_OVERRIDE_DISABLED 0x400
#define QLCNIC_IS_MSI_FAMILY(adapter) \
((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))
@@ -1060,7 +1061,7 @@
u8 enable_pm;
u8 dest_npar;
u8 discard_tagged;
- u8 mac_learning;
+ u8 mac_override;
u8 mac_anti_spoof;
u8 promisc_mode;
u8 offload_flags;
@@ -1134,7 +1135,7 @@
u8 host_vlan_tag;
u8 promisc_mode;
u8 discard_tagged;
- u8 mac_learning;
+ u8 mac_override;
u8 mac_anti_spoof;
u8 offload_flags;
u8 reserved[5];