net: usbnet: Leverage core stats allocator
authorBreno Leitao <leitao@debian.org>
Wed, 6 Mar 2024 14:26:41 +0000 (06:26 -0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 8 Mar 2024 04:51:34 +0000 (20:51 -0800)
commit352f5b328262f65e685d72e634d62df37ae64d76
treee0c32a73d58c251b48b520900aa6d43452df2ba3
parent5c497a64820ef9f10962a9c37607df45d6395fa5
net: usbnet: Leverage core stats allocator

With commit 34d21de99cea9 ("net: Move {l,t,d}stats allocation to core and
convert veth & vrf"), stats allocation could be done on net core
instead of in this driver.

With this new approach, the driver doesn't have to bother with error
handling (allocation failure checking, making sure free happens in the
right spot, etc). This is core responsibility now.

Remove the allocation in the usbnet driver and leverage the network
core allocation instead.

Signed-off-by: Breno Leitao <leitao@debian.org>
Acked-by: Oliver Neukum <oneukum@suse.com>
Link: https://lore.kernel.org/r/20240306142643.2429409-1-leitao@debian.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/usbnet.c