]> git.baikalelectronics.ru Git - kernel.git/commit
bnxt_en: Pass correct extended TX port statistics size to firmware.
authorMichael Chan <michael.chan@broadcom.com>
Fri, 26 Apr 2019 02:31:53 +0000 (22:31 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 27 Apr 2019 21:00:19 +0000 (17:00 -0400)
commit27556c3df6c73614f498db535497c0a6dab7d730
treeef41bd54eb9414a29d2fe81377077aba65b7c8d2
parent60e8187672a723bcee1ad227d13c7cfb8411ebc4
bnxt_en: Pass correct extended TX port statistics size to firmware.

If driver determines that extended TX port statistics are not supported
or allocation of the data structure fails, make sure to pass 0 TX stats
size to firmware to disable it.  The firmware returned TX stats size should
also be set to 0 for consistency.  This will prevent
bnxt_get_ethtool_stats() from accessing the NULL TX stats pointer in
case there is mismatch between firmware and driver.

Fixes: f677ad3ee1d6 ("bnxt_en: Add additional extended port statistics.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c