qtnfmac: switch to core handling of rx/tx byte/packet counters
authorHeiner Kallweit <hkallweit1@gmail.com>
Tue, 10 Nov 2020 19:48:54 +0000 (20:48 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Nov 2020 22:58:27 +0000 (14:58 -0800)
commit45fc3fd4308c5dbb45aa652399a084364e60d4b0
tree2388e7004240cefbe205f59cf394b7410c0a6953
parent2d5c27dafe63fb8a2e879f3e8f8a73a83a97d5df
qtnfmac: switch to core handling of rx/tx byte/packet counters

Use netdev->tstats instead of a member of qtnf_vif for storing a pointer
to the per-cpu counters. This allows us to use core functionality for
statistics handling.
The driver sets netdev->needs_free_netdev, therefore freeing the per-cpu
counters at the right point in time is a little bit tricky. Best option
seems to be to use the ndo_init/ndo_uninit callbacks.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/wireless/quantenna/qtnfmac/core.c
drivers/net/wireless/quantenna/qtnfmac/core.h
drivers/net/wireless/quantenna/qtnfmac/pcie/pearl_pcie.c
drivers/net/wireless/quantenna/qtnfmac/pcie/topaz_pcie.c