]> 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:20:27 +0000 (19:20 +0100)
commita8ee686597fb255f997e1f62eea8307a50aeea73
treeb7850263ee71d82c836c572dd4bc045049a85975
parent81dcfdb9a01566fd8cd31adce52fb4e448bfd15d
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