]> git.baikalelectronics.ru Git - kernel.git/commit
ethtool: pause: make sure we init driver stats
authorJakub Kicinski <kuba@kernel.org>
Wed, 14 Apr 2021 03:46:14 +0000 (20:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Apr 2021 20:03:06 +0000 (13:03 -0700)
commit4fb1c6a80749feb7758547688f2348e558e4760e
treec9ba1c42ab61d04ca305e747e0d86d562272753a
parent8bfe1af096cbe955fbd4dcd0d47b051bc8c515a7
ethtool: pause: make sure we init driver stats

The intention was for pause statistics to not be reported
when driver does not have the relevant callback (only
report an empty netlink nest). What happens currently
we report all 0s instead. Make sure statistics are
initialized to "not set" (which is -1) so the dumping
code skips them.

Fixes: 72da277b46bd ("ethtool: add standard pause stats")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ethtool/pause.c