diff options
author | Ben Hutchings <ben.hutchings@codethink.co.uk> | 2015-02-26 14:34:37 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-29 15:06:43 -0400 |
commit | 1e9e39f4a29857a396ac7b669d109f697f66695e (patch) | |
tree | 93ee52a78995cbc5440b0433d52aa6efc7e73b20 /drivers/net/usb/asix_common.c | |
parent | dde93dfea53c72b07907d9e44a6e4b1545f6bdc4 (diff) |
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>
Diffstat (limited to 'drivers/net/usb/asix_common.c')
-rw-r--r-- | drivers/net/usb/asix_common.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/usb/asix_common.c b/drivers/net/usb/asix_common.c index 5c55f11572ba..724a9b50df7a 100644 --- a/drivers/net/usb/asix_common.c +++ b/drivers/net/usb/asix_common.c | |||
@@ -188,6 +188,8 @@ struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb, | |||
188 | memcpy(skb_tail_pointer(skb), &padbytes, sizeof(padbytes)); | 188 | memcpy(skb_tail_pointer(skb), &padbytes, sizeof(padbytes)); |
189 | skb_put(skb, sizeof(padbytes)); | 189 | skb_put(skb, sizeof(padbytes)); |
190 | } | 190 | } |
191 | |||
192 | usbnet_set_skb_tx_stats(skb, 1); | ||
191 | return skb; | 193 | return skb; |
192 | } | 194 | } |
193 | 195 | ||