diff options
-rw-r--r-- | drivers/net/qlcnic/qlcnic_ethtool.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/qlcnic/qlcnic_ethtool.c b/drivers/net/qlcnic/qlcnic_ethtool.c index 550cfe9a1b1d..6a760140f792 100644 --- a/drivers/net/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/qlcnic/qlcnic_ethtool.c | |||
@@ -343,7 +343,7 @@ qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) | |||
343 | struct qlcnic_recv_context *recv_ctx = &adapter->recv_ctx; | 343 | struct qlcnic_recv_context *recv_ctx = &adapter->recv_ctx; |
344 | struct qlcnic_host_sds_ring *sds_ring; | 344 | struct qlcnic_host_sds_ring *sds_ring; |
345 | u32 *regs_buff = p; | 345 | u32 *regs_buff = p; |
346 | int ring, i = 0; | 346 | int ring, i = 0, j = 0; |
347 | 347 | ||
348 | memset(p, 0, qlcnic_get_regs_len(dev)); | 348 | memset(p, 0, qlcnic_get_regs_len(dev)); |
349 | regs->version = (QLCNIC_ETHTOOL_REGS_VER << 24) | | 349 | regs->version = (QLCNIC_ETHTOOL_REGS_VER << 24) | |
@@ -352,8 +352,8 @@ qlcnic_get_regs(struct net_device *dev, struct ethtool_regs *regs, void *p) | |||
352 | regs_buff[0] = (0xcafe0000 | (QLCNIC_DEV_INFO_SIZE & 0xffff)); | 352 | regs_buff[0] = (0xcafe0000 | (QLCNIC_DEV_INFO_SIZE & 0xffff)); |
353 | regs_buff[1] = QLCNIC_MGMT_API_VERSION; | 353 | regs_buff[1] = QLCNIC_MGMT_API_VERSION; |
354 | 354 | ||
355 | for (i = QLCNIC_DEV_INFO_SIZE + 1; diag_registers[i] != -1; i++) | 355 | for (i = QLCNIC_DEV_INFO_SIZE + 1; diag_registers[j] != -1; j++, i++) |
356 | regs_buff[i] = QLCRD32(adapter, diag_registers[i]); | 356 | regs_buff[i] = QLCRD32(adapter, diag_registers[j]); |
357 | 357 | ||
358 | if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) | 358 | if (!test_bit(__QLCNIC_DEV_UP, &adapter->state)) |
359 | return; | 359 | return; |