Commit 55ad95d9 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: gs_usb: gs_usb_receive_bulk_callback(): make use of stats

Make use the previously assigned variable stats instead of using
netdev->stats.

Link: https://lore.kernel.org/all/20230718-gs_usb-cleanups-v1-6-c3b9154ec605@pengutronix.deSigned-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent fcb880ef
......@@ -594,8 +594,8 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
gs_usb_set_timestamp(dev, skb, hf);
netdev->stats.rx_packets++;
netdev->stats.rx_bytes += hf->can_dlc;
stats->rx_packets++;
stats->rx_bytes += hf->can_dlc;
netif_rx(skb);
} else { /* echo_id == hf->echo_id */
......@@ -619,8 +619,8 @@ static void gs_usb_receive_bulk_callback(struct urb *urb)
skb = dev->can.echo_skb[hf->echo_id];
gs_usb_set_timestamp(dev, skb, hf);
netdev->stats.tx_packets++;
netdev->stats.tx_bytes += can_get_echo_skb(netdev, hf->echo_id,
stats->tx_packets++;
stats->tx_bytes += can_get_echo_skb(netdev, hf->echo_id,
NULL);
gs_free_tx_context(txc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment