]> git.baikalelectronics.ru Git - kernel.git/commit
igc: Fix returning wrong statistics
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Fri, 25 Sep 2020 18:35:37 +0000 (11:35 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 10 Nov 2020 23:03:14 +0000 (15:03 -0800)
commitb6df8729bf346d6e4bd5076aa71d82fffd01882f
tree4cc10da00a7228d56e841e2938cc248d20448327
parentd72dc6d7cca861471de931ccdb6dbb1ccb33f804
igc: Fix returning wrong statistics

'igc_update_stats()' was not updating 'netdev->stats', so the returned
statistics, for example, requested by:

$ ip -s link show dev enp3s0

were not being updated and were always zero.

Fix by returning a set of statistics that are actually being
updated (adapter->stats64).

Fixes: 903f87b07447 ("igc: Add netdev")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/igc/igc_main.c