]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Add bnxt_get_num_stats() to centrally get the number of ethtool stats.
authorMichael Chan <michael.chan@broadcom.com>
Mon, 24 Jul 2017 16:34:23 +0000 (12:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 25 Jul 2017 00:29:58 +0000 (17:29 -0700)
commita6f49128fdbf0304b072a3919a880cc843f50991
tree7d6ff5464304d559b5f32601e80ff9318456f72c
parent3e273ad47133e375607b132014dadcf1955c7e70
bnxt_en: Add bnxt_get_num_stats() to centrally get the number of ethtool stats.

Instead of duplicating the logic multiple times.  Also, it is unnecessary
to zero the buffer in .get_ethtool_stats() because it is already zeroed
by the caller.

Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c