summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2017-07-14 09:27:09 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2017-09-29 12:51:02 -0700
commit22b96551f213d7e7d743442c923c266a10306b9b (patch)
tree20f66060ad1f59a2408f39efacc84df6fcb9000c /drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
parenta3f5aa907340b5d7b54223ddbaa90410f168864d (diff)
i40e: refactor FW version checking
The i40e driver now supports two different devices with two different firmware versions. So be smart about how we handle these. Move the FW version macros to the appropriate header file, and add a convenience macro that checks the version based on the device. Then use this macro to check whether or not the driver can use the new link info API. Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h')
-rw-r--r--drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
index 5d5f422cbae5..e2a9ec80a623 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
@@ -34,7 +34,15 @@
*/
#define I40E_FW_API_VERSION_MAJOR 0x0001
-#define I40E_FW_API_VERSION_MINOR 0x0005
+#define I40E_FW_API_VERSION_MINOR_X722 0x0005
+#define I40E_FW_API_VERSION_MINOR_X710 0x0007
+
+#define I40E_FW_MINOR_VERSION(_h) ((_h)->mac.type == I40E_MAC_XL710 ? \
+ I40E_FW_API_VERSION_MINOR_X710 : \
+ I40E_FW_API_VERSION_MINOR_X722)
+
+/* API version 1.7 implements additional link and PHY-specific APIs */
+#define I40E_MINOR_VER_GET_LINK_INFO_XL710 0x0007
struct i40e_aq_desc {
__le16 flags;