]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:22:19 +0000 (19:22 +0100)
commit4bf509f4f98f8d0039a06777d4bdace437dbae9f
tree34ddefd9c8b31fd390f5f71fef57ddaf6f53ccc6
parent3fbff00c08d26e0cdb395288370d8bcdf69417cc
igc: Fix returning wrong statistics

[ Upstream commit 6b7ed22ae4c96a415001f0c3116ebee15bb8491a ]

'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: c9a11c23ceb6 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/intel/igc/igc_main.c