]> git.baikalelectronics.ru Git - kernel.git/commit
usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers
authorBen Hutchings <ben.hutchings@codethink.co.uk>
Thu, 26 Feb 2015 19:34:37 +0000 (19:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 29 Mar 2015 19:06:43 +0000 (12:06 -0700)
commit47cdc2f1e2adb49f3e4bd8bf204b9a578bc238f3
tree93ee52a78995cbc5440b0433d52aa6efc7e73b20
parentcf705c68e3e947fd519b011a0acd272455076517
usbnet: Fix tx_packets stat for FLAG_MULTI_FRAME drivers

Currently the usbnet core does not update the tx_packets statistic for
drivers with FLAG_MULTI_PACKET and there is no hook in the TX
completion path where they could do this.

cdc_ncm and dependent drivers are bumping tx_packets stat on the
transmit path while asix and sr9800 aren't updating it at all.

Add a packet count in struct skb_data so these drivers can fill it
in, initialise it to 1 for other drivers, and add the packet count
to the tx_packets statistic on completion.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/asix_common.c
drivers/net/usb/cdc_ncm.c
drivers/net/usb/sr9800.c
drivers/net/usb/usbnet.c
include/linux/usb/usbnet.h