diff options
author | Edward Cree <ecree@solarflare.com> | 2013-09-25 12:34:12 -0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-10-04 18:31:50 -0400 |
commit | 87648cc925222f16c3bd119af8ae8e8fb2f3fe1d (patch) | |
tree | abccca3a6779ad6f9879b2ae094ce04e51bdb953 /drivers/net/ethernet/sfc | |
parent | d546a89362dcc35bc1aacf0e8e3b0da5a7d2dc89 (diff) |
sfc: Fix internal indices of ethtool stats for EF10
The indices in nic_data->stats need to match the EF10_STAT_whatever
enum values. In efx_nic_update_stats, only mask; gaps are removed in
efx_ef10_update_stats.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r-- | drivers/net/ethernet/sfc/nic.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/ethernet/sfc/nic.c b/drivers/net/ethernet/sfc/nic.c index e7dbd2dd202e..9826594c8a48 100644 --- a/drivers/net/ethernet/sfc/nic.c +++ b/drivers/net/ethernet/sfc/nic.c | |||
@@ -469,8 +469,7 @@ size_t efx_nic_describe_stats(const struct efx_hw_stat_desc *desc, size_t count, | |||
469 | * @count: Length of the @desc array | 469 | * @count: Length of the @desc array |
470 | * @mask: Bitmask of which elements of @desc are enabled | 470 | * @mask: Bitmask of which elements of @desc are enabled |
471 | * @stats: Buffer to update with the converted statistics. The length | 471 | * @stats: Buffer to update with the converted statistics. The length |
472 | * of this array must be at least the number of set bits in the | 472 | * of this array must be at least @count. |
473 | * first @count bits of @mask. | ||
474 | * @dma_buf: DMA buffer containing hardware statistics | 473 | * @dma_buf: DMA buffer containing hardware statistics |
475 | * @accumulate: If set, the converted values will be added rather than | 474 | * @accumulate: If set, the converted values will be added rather than |
476 | * directly stored to the corresponding elements of @stats | 475 | * directly stored to the corresponding elements of @stats |
@@ -503,11 +502,9 @@ void efx_nic_update_stats(const struct efx_hw_stat_desc *desc, size_t count, | |||
503 | } | 502 | } |
504 | 503 | ||
505 | if (accumulate) | 504 | if (accumulate) |
506 | *stats += val; | 505 | stats[index] += val; |
507 | else | 506 | else |
508 | *stats = val; | 507 | stats[index] = val; |
509 | } | 508 | } |
510 | |||
511 | ++stats; | ||
512 | } | 509 | } |
513 | } | 510 | } |