summaryrefslogtreecommitdiff
path: root/ixgbe.c
diff options
context:
space:
mode:
Diffstat (limited to 'ixgbe.c')
-rw-r--r--ixgbe.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ixgbe.c b/ixgbe.c
index dae11d4..9b005f2 100644
--- a/ixgbe.c
+++ b/ixgbe.c
@@ -133,10 +133,13 @@ ixgbe_dump_regs(struct ethtool_drvinfo *info, struct ethtool_regs *regs)
u8 i;
enum ixgbe_mac_type mac_type;
- if (version != 1)
+ if (version == 0)
return -1;
- mac_type = ixgbe_get_mac_type(hw_device_id);
+ /* The current driver reports the MAC type, but older versions
+ * only report the device ID so we have to infer the MAC type.
+ */
+ mac_type = version > 1 ? version : ixgbe_get_mac_type(hw_device_id);
reg = regs_buff[1065];
fprintf(stdout,