diff options
author | Edward Cree <ecree@solarflare.com> | 2013-09-25 17:34:12 +0100 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-10-04 23:31:50 +0100 |
commit | 87648cc925222f16c3bd119af8ae8e8fb2f3fe1d (patch) | |
tree | abccca3a6779ad6f9879b2ae094ce04e51bdb953 /drivers/net/ethernet | |
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')
-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 e7dbd2dd202..9826594c8a4 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, * @count: Length of the @desc array * @mask: Bitmask of which elements of @desc are enabled * @stats: Buffer to update with the converted statistics. The length - * of this array must be at least the number of set bits in the - * first @count bits of @mask. + * of this array must be at least @count. * @dma_buf: DMA buffer containing hardware statistics * @accumulate: If set, the converted values will be added rather than * 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, } if (accumulate) - *stats += val; + stats[index] += val; else - *stats = val; + stats[index] = val; } - - ++stats; } } |